Count records by field
catalog_count_byGroup catalog records by a field and get counts per value, sorted by frequency. Optionally filter records first to count only matching entries.
Instructions
Group records by a field and count each value, most common first. Array fields count each element. Optional filter applies first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | Yes | ||
| filter | No | Filter spec. Keys: eq (equality: {"type":"tent","heated":true}), min / max (numeric bounds: {"price":100}; records without a number in a bounded field are excluded), has (array membership, all required: {"tags":["a","b"]}), contains (case-insensitive substring: {"name":"alpine"}; use field "*" to search all string fields). |