Map Reduce query with a group by within a timestamp range

I’m on Android. I found a different way to achieve what I needed. Basically, the reducer ends up doing a sorts of grouping. It seems to work and should work even with a rereduce.

My solution was to return a map with the key as the “types” and the value as an array of reduced values. For instance [count, sum, product].

Thanks.