aggregate
Computes group-by statistics—count, count_distinct, sum, avg, min, max, geodesic area and length—over a map layer with optional filters and grouping, returning a table without geometry.
Instructions
Group-by statistics over a layer: count, count_distinct, sum, avg, min, max, area_km2 (geodesic polygon area), length_km (geodesic line length), optionally grouped by columns and filtered. Returns a table (no geometry).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layer | Yes | ||
| limit | No | Max rows to return (default 100; server-side cap applies). | |
| filters | No | Attribute filters on the layer, combined with AND. | |
| metrics | No | Measures to compute (default: count). | |
| group_by | No | Columns to group by. | |
| order_by | No | Output column to sort by (default: first metric). | |
| descending | No |