Revert "Use unique cartodb_id in aggregated results"

This reverts commit c1da1a8a16.
This is reverted for moving the change out of PR #913 into its own PR for clarity.
This commit is contained in:
Javier Goizueta 2018-04-05 12:12:58 +02:00
parent 98cb0878d9
commit 44424583f0

View File

@ -290,7 +290,7 @@ const aggregationQueryTemplates = {
!bbox! AS bbox
)
SELECT
MIN(_cdb_query.cartodb_id) AS cartodb_id,
row_number() over() AS cartodb_id,
ST_SetSRID(
ST_MakePoint(
AVG(ST_X(_cdb_query.the_geom_webmercator)),
@ -317,7 +317,6 @@ const aggregationQueryTemplates = {
),
_cdb_clusters AS (
SELECT
MIN(_cdb_query.cartodb_id) AS cartodb_id,
Floor(ST_X(_cdb_query.the_geom_webmercator)/_cdb_params.res)::int AS _cdb_gx,
Floor(ST_Y(_cdb_query.the_geom_webmercator)/_cdb_params.res)::int AS _cdb_gy
${dimensionDefs(ctx)}
@ -328,7 +327,7 @@ const aggregationQueryTemplates = {
${havingClause(ctx)}
)
SELECT
_cdb_clusters.cartodb_id AS cartodb_id,
row_number() over() AS cartodb_id,
ST_SetSRID(ST_MakePoint((_cdb_gx+0.5)*res, (_cdb_gy+0.5)*res), 3857) AS the_geom_webmercator
${dimensionNames(ctx)}
${aggregateColumnNames(ctx)}