Trying to use group by with time base window

index
query

#1

Hi I’m trying to do a view of the equivalent:

SELECT var1,va2,var3,count(1) FROM bucket
WHERE _type="myType"
AND NOW_UTC() BETWEEN startTime AND endTime GROUP BY var1,va2,var3

I manage to get the wanted results of the group by count with
a count reduce view with group=true
emit([var1,va2,var3],1)

But I didn’t manage to incorporate the time window (with startkey,endKey ? )
Without losing the count.

Any idea?