diff --git a/lib/cartodb/models/dataview/histogram.js b/lib/cartodb/models/dataview/histogram.js index f9162169..cbd9fe20 100644 --- a/lib/cartodb/models/dataview/histogram.js +++ b/lib/cartodb/models/dataview/histogram.js @@ -169,7 +169,7 @@ var dateHistogramQueryTpl = dot.template([ ' count(*) AS freq', 'FROM ({{=it._query}}) _cdb_histogram, basics, bins, nulls', 'WHERE date_part(\'epoch\', {{=it._column}}) IS NOT NULL', - 'GROUP BY bin, bins_number, bin_width, nulls_count, avg_val, start_date', + 'GROUP BY bin, bins_number, bin_width, nulls_count, avg_val', 'ORDER BY bin' ].join('\n')); @@ -180,7 +180,8 @@ var TYPE = 'histogram'; type: 'histogram', options: { column: 'name', - bins: 10 // OPTIONAL + bins: 10, // OPTIONAL + aggregation: 'day' // OPTIONAL } } */