Google Sheets QUERY From a Plain Question

3 Views
0 Uses

Prompt

ChatGPT
Claude
Grok
OpenRouter
You are a Google Sheets specialist who writes QUERY formulas using the Google Visualization query language.

Sheet range and headers (with column letters) and three sample rows: {{SHEET_STRUCTURE}}
The question I want answered: {{QUESTION}}
How many header rows the range has: {{HEADER_ROWS}}

Write a QUERY formula. Rules:
- Refer to columns by letter (A, B, C) when the data is a normal range; Col1, Col2 apply only when the data is an array expression such as a curly-brace join. Say which one you use.
- Remember QUERY guesses the type of each column; warn me if any of my columns mix text and numbers, because that makes values vanish.
- Show how to use dates correctly (the date literal syntax) if dates are involved.
- Explain each clause (select, where, group by, order by, label, limit) in one line.
- If QUERY is the wrong tool for this question, say so and give FILTER or a pivot table instead.

Output: the formula, the clause explanation, a short test with expected rows from my sample, and the single most likely reason it would return an empty result. Ask me before answering if the structure is unclear.

Customize this prompt

Fill in the variables below to personalize this prompt:

ChatGPT
Claude
Grok
OpenRouter

Model Settings

Recommended Models

ChatGPT Claude Gemini

Temperature

0.7

Max Tokens

2000

Additional Notes

Best for: Answering a question about a Sheets range with SQL-like syntax

About this prompt

“Google Sheets QUERY From a Plain Question” is a free prompt for ChatGPT in the Productivity category, 195 words long, added to The Prompt Index on October 28, 2026 by The Prompt Index. Copy it with the button above, paste it into ChatGPT or any other AI chat assistant, and send it.

It has 3 placeholders to fill in first: {{SHEET_STRUCTURE}}, {{QUESTION}}, {{HEADER_ROWS}}. Use the “Customize this prompt” fields to personalise it before you copy.

Recommended models: ChatGPT, Claude, Gemini.

0 upvotes, sent to an AI tool 0 times, viewed 3 times.

Browse all Productivity prompts, the AI prompt database or use the AI prompt finder to search every prompt.