query
Run structured NFL queries with explicit term definitions, returning SQL, matched samples, and season coverage for accurate data analysis.
Instructions
Run a structured query. plan is {entity, where, seasons, game_types, group_by, metrics, order_by, limit, allow_partial_coverage, sample_rows, question}; where clauses are {"term": name} for concepts, {"attr": name, "op": …, "value": …} for raw fields, and {"not"|"any_of"|"all_of": …} to combine. Every fuzzy word in the user's question must be a term. If a term has no definition this tool returns unresolved_term — do not replace it with an attribute rule to get past the error; call propose_definition and ask the user. The result includes definitions_used, the seasons actually covered, a sample of matched rows and the SQL; report the definitions and coverage alongside the number, because the number is not meaningful without them. If warnings mention evidence unavailable for early seasons, say so.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||