url: "/sensmon/_design/sensmon-calendar/_view/summary_temp_day?group=true", var key = [d.getFullYear(),(d.getMonth()+1),d.getDate()]; emit(key, doc.solarpower); {"count":count,"max":max,"min":min,"ave":ave} map reduce {"count":count,"max":max,"min":min,"ave":ave} {"count":count,"max":max,"min":min,"ave":ave} {"count":count,"max":max,"min":min,"ave":ave} {"count":count,"max":max,"min":min,"ave":ave} {"count":count,"max":max,"min":min,"ave":ave} {"count":count,"max":max,"min":min,"ave":ave} {"count":count,"max":max,"min":min,"ave":ave} rereduce {"count":count,"max":max,"min":min,"ave":ave} {"count":count,"max":max,"min":min,"ave":ave} {"count":count,"max":max,"min":min,"ave":ave} values.forEach(function(val){ max = Math.max(max,val.max); min = Math.min(min,val.min); ave += val.ave; count += val.count; }); ave = ave/values.length; return {"count":count,"max":max,"min":min,"ave":ave}; 201012݄12༵