What is query string in Google Sheets?

When to use it

Use QUERY clauses when you want SQL-style filtering, grouping, or labels on a table in one formula.

When to skip it

Skip QUERY when FILTER, SORT, and UNIQUE already express the logic with less string syntax to maintain.

Related Tutorials

Watch how query string works

Watch more tutorials
Scrape Google Maps

Scrape Google Maps

Scrape any query in Google Maps into your Google Sheets. Enter your API ...
Search Every Function in Google Sheets

Search Every Function in Google Sheets

Built a useful tool to filter Google Sheet formulas based on keywords.
Search for Photos in a Google Sheet by Keyword

Search for Photos in a Google Sheet by Keyword

Add one more feature to our Photo search inside of Google Sheets.

Related blog posts

Guides that explain query string in more depth.

Browse the blog

Related terms

QUERY

QUERY runs a SQL-like statement against a range of cells and returns a new table of results. You pass a data range, a query string with SELECT, WHERE, ORDER BY, and optional headers. It is the fastest way to filter, sort, group, and pivot sheet data without helper columns.

Read guide →

SQL-style queries (QUERY)

The QUERY function runs a SQL-like statement against a range in your sheet. You SELECT columns, filter with WHERE, sort with ORDER BY, and aggregate with GROUP BY without building many helper columns. It is the closest native option to a small in-sheet database query.

Read guide →

FILTER

FILTER returns only the rows from a range that meet one or more conditions. Conditions are boolean arrays the same height as the data. FILTER spills results automatically, so it replaced many INDEX/SMALL helper-column patterns for live subsets.

Read guide →

SELECT

Select is part of the SQL-like QUERY function language in Google Sheets. QUERY reads a range with SELECT, WHERE, GROUP BY, ORDER BY, and LABEL clauses instead of nested spreadsheet functions.

Read guide →

WHERE

Where is part of the SQL-like QUERY function language in Google Sheets. QUERY reads a range with SELECT, WHERE, GROUP BY, ORDER BY, and LABEL clauses instead of nested spreadsheet functions.

Read guide →

GROUP BY

Group By is part of the SQL-like QUERY function language in Google Sheets. QUERY reads a range with SELECT, WHERE, GROUP BY, ORDER BY, and LABEL clauses instead of nested spreadsheet functions.

Read guide →