Aggregate
When applied:
- without , it produces one row from the whole table,
- within a
group
pipeline, it produces one row from each group.
Currently, all declared aggregation functions are min
, max
, count
, average
, stddev
, avg
, sum
and . We are in the process of filling out .
PRQL
from employees
aggregate [
average salary,
ct = count
]
SQL
PRQL
group [title, country] (
aggregate [
ct = count
]
)
SQL
Aggregate is required
PRQL
from employees
SQL
This ensures that does not manipulate the number of rows, but only ever adds a column. For more information, see .