diff --git a/lib/cartodb/models/dataview/histograms/date-histogram.js b/lib/cartodb/models/dataview/histograms/date-histogram.js index af151a72..5e64a494 100644 --- a/lib/cartodb/models/dataview/histograms/date-histogram.js +++ b/lib/cartodb/models/dataview/histograms/date-histogram.js @@ -127,8 +127,11 @@ const dateIntervalQueryTpl = ctx => ` FROM __cdb_interval_in_minutes, __cdb_dates ) SELECT + ROUND(__cdb_days / 365243) AS millennium, + ROUND(__cdb_days / 36525) AS century, + ROUND(__cdb_days / 3652) AS decade, ROUND(__cdb_days / 365) AS year, - ROUND(__cdb_days / 90) AS quarter, + ROUND(__cdb_days / 91) AS quarter, ROUND(__cdb_days / 30) AS month, ROUND(__cdb_days / 7) AS week, __cdb_days AS day, @@ -143,13 +146,17 @@ const MAX_INTERVAL_VALUE = 366; const DATE_AGGREGATIONS = { 'auto': true, + 'second' : true, 'minute': true, 'hour': true, 'day': true, 'week': true, 'month': true, 'quarter': true, - 'year': true + 'year': true, + 'decade' : true, + 'century' : true, + 'millennium' : true }; /**