Task prompt · Data
Write a Google Sheets QUERY formula
by Agent Yard TeamFilter, group and sort a sheet with one QUERY formula, explained step by step.
Use cases
- Filter, group and sort a sheet with one QUERY formula, explained step by step.
- Reuse it as often as you like: fill in the blanks (sheet name; range; headers) with new details and copy again.
- With ChatGPT, Claude, Gemini and more, the AIs that support what this prompt needs.
Featured in: Best ChatGPT prompts for SQL and databases, Best AI prompts for spreadsheets and formulas.
How to use it
- Open chatgpt.com or claude.ai (or another AI listed here).
- Fill in the highlighted blanks ([SHEET NAME], [RANGE], [HEADERS]) below, or edit them after pasting.
- Copy the prompt, paste it into the chat and send.
Fill in the blanks (optional)
Prompt
I use Google Sheets. My data is in [SHEET NAME], range [RANGE], with these headers in row 1: [HEADERS]. I want to: [WHAT YOU WANT, e.g. total sales by region for 2026, highest first]. Give me the QUERY formula, explain each clause (select, where, group by, order by, label) in plain words, and show what the result will look like. Mention common errors like mixed data types in a column.
One email a week
The Weekly is presented byyour brandSponsored · openThe best new prompts and personas, nothing else.