Formula guide · Google Sheets · Updated May 13, 2026

QUERY Select Where Examples

Filter rows and choose columns in Google Sheets with QUERY select and where clauses.

Quick Answer

Use select to choose output columns and where to keep only rows that match your condition.

Copyable Formula

=QUERY(A1:D20,"select A, D where C = 'Paid'",1)

Syntax

=QUERY(A1:D20,"select A, D where C = 'Paid'",1)

Google Sheets

Worked Example

ACD
ClientStatusAmount
AcmePaid300
North CoOpen180
Blue LabPaid420

Result: Returns Client and Amount only for Paid rows.

Steps

  • Start with select and list the columns you want.
  • Add where and the condition that rows must satisfy.
  • Use single quotes inside the query string for text conditions.

Common Mistakes

  • Writing double quotes inside double quotes without escaping.
  • Selecting a column that contains mixed data types.
  • Forgetting the header argument.

Excel vs Google Sheets Notes

This page is focused on Google Sheets. Excel may require a different function, pivot table, or Power Query workflow.

Editorial check: This guide was last updated May 13, 2026. Formula behavior can vary by Excel version, Google Sheets rollout, and spreadsheet locale.

FAQ