The record action on your storyboard now includes a "Query" mode, letting you run aggregations directly from a record type.
Now, instead of fetching every record and processing the results downstream, you get grouped totals back in a single event. For example, you can search for a filtered set of records and count occurrences of a specific field value.
When using the "query" mode for a record action on the storyboard:
Choose an aggregation. Count, sum, average, minimum, maximum, or median.
Group results by up to two fields. For timestamp fields, choose hourly, daily, weekly, monthly, or yearly granularity.
Refine your results. Order by any output column, and narrow down with conditions or a time range.
This query function is also available via a new POST /api/v1/records/query endpoint, so you can power dashboards, charts, and metric tiles in your apps.