🗂️ Google Sheets query examples

Query Select Examples in Google Sheets

Use QUERY to select specific columns from a range. This page gives a clear pattern, five practical examples and common mistakes to avoid.

Updated 2026-06-125 practical examplesCopy-ready formulas

💡 Ideas for You

Learning resources for Google Sheets formulas, trackers and reports.

4 useful links

Some links in this section may be affiliate links. Choose only what is useful for your own work.

Syntax or pattern

Use QUERY to select specific columns from a range.

=QUERY(data, "select A, B, C", 1)
✍️

5 practical examples

1

Select useful columns from raw data

Return only the columns needed for a clean report view.

=QUERY(A1:E, "select A, C, E", 1)

Adjust the ranges, criteria and sheet names to match your workbook.

2

Select rows from a named range

Use a named range so the formula is easier to read.

=QUERY(SalesData, "select A, B, D", 1)

Adjust the ranges, criteria and sheet names to match your workbook.

3

Select columns and rename later

A simple first step before adding labels or formatting.

=QUERY(A1:D, "select A, D", 1)

Adjust the ranges, criteria and sheet names to match your workbook.

4

Select only non-empty rows

Avoid showing blank rows in a dashboard table.

=QUERY(A1:D, "select A, B where A is not null", 1)

Adjust the ranges, criteria and sheet names to match your workbook.

5

Select imported data

Combine IMPORTRANGE and QUERY for a cleaner external table.

=QUERY(IMPORTRANGE(B1, "Data!A:E"), "select Col1, Col3", 1)

Adjust the ranges, criteria and sheet names to match your workbook.

Common mistakes to avoid

  • Using column letters instead of Col1 notation with imported array data.
  • Forgetting quotes inside QUERY strings.
  • Grouping without aggregating non-grouped columns.

FAQ

What is this Google Sheets page for?

This page gives copy-ready examples for query select examples so you can understand the pattern and adapt it to real spreadsheet work.

Can I copy these formulas directly?

Yes. Use the copy buttons, then adjust sheet names, ranges, criteria and column references for your own file.

Why does my formula return an error?

The most common causes are mismatched ranges, missing quotes around text criteria, blank source data, or references that do not match your sheet layout.