Google Sheets QUERY builder

Pick your columns and conditions; get the formula. QUERY's syntax is unmemorable rather than hard — the clause order is fixed, the column references change depending on where your data came from, and every value type quotes differently. This gets all three right.

Your data

The range holding your data, including the header row.

Paste your header row and the pickers below use your own names.

Usually 1. Leave blank to let QUERY guess — it guesses badly on mixed columns.

Show these columns

Tick none to select every column.

Keep only rows where…

Dates must be yyyy-mm-dd. Choosing “a cell” concatenates the reference correctly — that one trips up nearly everybody.

Summarise (optional)

Summarising needs a group — one row per value of whatever you tick.

Sort and limit (optional)

More on QUERY

The QUERY reference page has a worked example captured from a real sheet, plus the gotchas that cause most of the trouble.