               temp_table;
             "
 
-            (shape-aggregagation-popup-sql (get current-layer "popup") shape-table-name "" ",")
+            (shape-aggregagation-extra-cols-sql extra-cols shape-table-name "" ",")
             shape-table-name
             (get current-layer "geom")
             aggregation-method

                                     c)) popup-columns) geom-column)
                point-color-column (conj point-color-column)))
    hue (color-to-hue (clojure.string/upper-case (get current-layer "gradientColor" "#FF0000")))
    ]

    (format "with temp_table as

            (get current-layer "aggregationGeomColumn")
            shape-table-name
            (get current-layer "geom")
            (shape-aggregagation-extra-cols-sql extra-cols shape-table-name "," "")
            (shape-aggregagation-extra-cols-sql extra-cols "temp_table" "" ",")
            (get current-layer "geom")
            hue
            )))
