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
| Setting | What it does |
|---|---|
| Collection | Which collection. |
| Where | Which rows. Empty is every row. See Find rows. |
| Work out | How many there are, or the total, average, smallest or largest of a column. |
| Column | For all but counting: the number column. Rows where it isn't a number are left out. |
| Save as | The 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.