From 507d105ab27a4debdc34a22860624a7fc4fe0068 Mon Sep 17 00:00:00 2001 From: Javier Goizueta Date: Thu, 14 Dec 2017 16:37:40 +0100 Subject: [PATCH] Add mode aggregation --- lib/cartodb/models/aggregation/aggregation-query.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cartodb/models/aggregation/aggregation-query.js b/lib/cartodb/models/aggregation/aggregation-query.js index b987e24d..ca6d3431 100644 --- a/lib/cartodb/models/aggregation/aggregation-query.js +++ b/lib/cartodb/models/aggregation/aggregation-query.js @@ -46,6 +46,9 @@ const SUPPORTED_AGGREGATE_FUNCTIONS = { }, 'max': { sql: (column_name, params) => `max(${params.aggregated_column || column_name})` + }, + 'mode': { + sql: (column_name, params) => `cdb_mode(${params.aggregated_column || column_name})` } };