BuildcordDocs

Count or total rows

Count matching rows, or add up, average or find the least or most of a column.

data.aggregate works something out over every matching row of a collection, without a loop.

Settings

SettingWhat it does
CollectionWhich collection.
WhereWhich rows. Empty is every row. See Find rows.
Work outHow many there are, or the total, average, smallest or largest of a column.
ColumnFor all but counting: the number column. Rows where it isn't a number are left out.
Save asThe name to keep the answer under. The default is total.

Ways out

out. Turn on If it fails for a red way out.

Produces

{temp.name}, and {rows.count}: how many rows matched.

Notes

  • The total of no rows is 0. The average, smallest and largest of no rows is empty.

Example

/tickets replies {temp.total} open tickets, counting tickets where status = open.

On this page