Numeric histograms: Avoid conflicts with 'bin' named columns

This commit is contained in:
Raul Marin 2017-12-22 17:12:57 +01:00
parent 8012d76b68
commit 031e1253ca

View File

@ -28,7 +28,7 @@ const binsQueryTpl = ctx => `
) AS quartile
FROM __cdb_filtered_source) _cdb_quartiles
WHERE quartile = 1 or quartile = 3
GROUP BY quartile
GROUP BY 1
) __cdb_iqr
),
__cdb_bins AS (
@ -137,8 +137,8 @@ FROM
(
${ctx.query}
) __cdb_filtered_source_query${extra_tables}
GROUP BY bin${extra_groupby}
ORDER BY bin;`;
GROUP BY 10${extra_groupby}
ORDER BY 10;`;
}
_hasOverridenBins (override) {