Is it possible to filter based on aggregation results in couchdb? For example, 
say I have a map/reduce query that counts the number of reports produced 
by an employee on a given date 
 
Here's my map function
 
function(doc) 
{ 
   if(doc.employeeId && doc.type == 'Report') 
   { 
      emit([doc.reportDate, doc.employeeId], 1)
   }
}
 
and my reduce function
 
function(keys, values, rereduce) 
{
   return sum(values); 
}
 
I'm wondering if its possible to tweak this query so that I could identify only 
those employees that created more than one report on a given day (e.g. 
query where count > 1)? I appreciate any help or suggestions.
 
Thanks!
Bill

Reply via email to