From e82d688a187c6624213a26bbb74e27438945c3b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Mon, 5 Jun 2017 16:09:47 +0200 Subject: [PATCH] Fix typo --- lib/cartodb/models/dataview/histogram.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cartodb/models/dataview/histogram.js b/lib/cartodb/models/dataview/histogram.js index be4c7193..9db9e0e7 100644 --- a/lib/cartodb/models/dataview/histogram.js +++ b/lib/cartodb/models/dataview/histogram.js @@ -161,9 +161,9 @@ var dateHistogramQueryTpl = dot.template([ ' END AS bin,', ' min(date_part(', ' \'epoch\', ', - ' date_trunc(\'{{=it._aggregation}}\', d AT TIME ZONE \'{{=it._timezone}}\'', + ' date_trunc(\'{{=it._aggregation}}\', {{=it._column}} AT TIME ZONE \'{{=it._timezone}}\'', ' ) AT TIME ZONE \'{{=it._timezone}}\'))::numeric AS timestamp,', - ' min(date_part(\'epoch\', {{=it._column}}))::numeric AS min,', + ' min(date_part(\'epoch\', ))::numeric AS min,', ' max(date_part(\'epoch\', {{=it._column}}))::numeric AS max,', ' avg(date_part(\'epoch\', {{=it._column}}))::numeric AS avg,', ' count(*) AS freq',