incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hardtke <>
Subject Re: how to sum values of a view in a date range?
Date Thu, 09 Jun 2011 16:26:52 GMT
Hi Fabio,

This should work.  You can use the _sum builtin as reduce:


You then need to query your view with the proper group level and a 
startkey and endkey:


That gives you the sum for the month of March.

On 06/09/11 09:06, Fabio Di Bernardini wrote:
> Il 09/06/2011 17:18, Fabio Di Bernardini ha scritto:
>> If I have a map function emitting a timestamp as key ad a number as 
>> document, how to get sum of values selecting a date range?
> More datails here:


View raw message