aggregate
Groups rows in an Excel sheet and computes sum, count, mean, min, or max per group, with row and group filters.
Instructions
Fetches a sheet LIVE and runs a grouped aggregation. Operations: sum, count, mean, min, max. group_by is one column name or a list of them. conditions filters rows before aggregating (same grammar as filter_sheet, including the object form). having filters the AGGREGATED rows afterwards, e.g. having={"Revenue": ">1000"} keeps only groups whose aggregate exceeds 1000. SINGLE FILE ONLY. For totals across multiple files you MUST use cross_file_aggregate instead — never use this tool and then manually add results across files. Get column names from get_workspace_graph first. Returns rows plus a truncated flag. If conditions matched zero rows, zero_match_diagnostics shows what each condition matched alone and the values actually present — correct the condition and retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | Yes | ||
| having | No | ||
| group_by | Yes | ||
| file_name | Yes | ||
| operation | Yes | ||
| value_col | Yes | ||
| conditions | No | ||
| folder_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||