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

  1. from employees
  2. aggregate [
  3. average salary,
  4. ct = count
  5. ]

SQL

PRQL

  1. group [title, country] (
  2. aggregate [
  3. ct = count
  4. ]
  5. )

SQL

Aggregate is required

PRQL

  1. from employees

SQL

This ensures that does not manipulate the number of rows, but only ever adds a column. For more information, see .