Open tasks only
=QUERY(Tasks!A1:D, "select A, B, C where D = 'Open' order by B asc", 1) returns assignee, title, and due date for open items.
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.
Use QUERY when you need repeatable reports from a flat table: top sellers by month, rows where status is Open, grouped totals, or a sorted slice you refresh from one formula.
Skip QUERY for one-off edits, tiny lists where FILTER is simpler, or when editors must change logic without touching query strings. Heavy text parsing is often easier with REGEX functions.
Pick a rectangular data range with headers in the first row, for example Data!A1:F500.
Write a query string starting with SELECT and list the columns or aggregates you need.
Add WHERE to filter rows, ORDER BY to sort, LIMIT to cap rows, and GROUP BY for summaries.
Set the optional headers argument to 1 when the first row of the range contains column labels.
Paste the formula in a clean output area because QUERY spills its result and overwrites cells below and to the right.
Refresh IMPORTRANGE or source data first so QUERY reads current values on dashboard tabs.
=QUERY(Tasks!A1:D, "select A, B, C where D = 'Open' order by B asc", 1) returns assignee, title, and due date for open items.
=QUERY(Sales!A1:C, "select B, sum(C) where A is not null group by B label sum(C) 'Revenue'", 1) groups revenue by month.
=QUERY(Products!A1:C, "select A, B order by C desc limit 10", 1) lists the ten highest-scoring SKUs.
Build this without starting from a blank cell
Use a Better Sheets tool for QUERY, then watch a walkthrough when you want the full pattern.
Watch how QUERY works
Guides that explain QUERY in more depth.
Boost productivity and streamline your workflow in Google Sheets with our quick tips and free tools. Breathe new life into your spreadsheets today.
Read post →Nothing is better than Google Sheets. You just need to learn more about the unlimited power of Google Sheets. Functions, Formulas, Apps Script and more.
Read post →Users can also customize the appearance of their spreadsheets with different fonts, colors, and themes.
Read post →ARRAYFORMULA tells Google Sheets to treat a formula as an array operation so one expression fills many cells at once. It is common with IF, VLOOKUP, and math on full columns before dynamic arrays made many patterns automatic. It still matters for legacy sheets and explicit control.
Read guide →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 →IMPORTRANGE loads values from a range in another Google spreadsheet into your current file. You pass the spreadsheet URL or key plus a range string with an optional sheet name. After you grant access once, the link stays live and updates when the source changes.
Read guide →UNIQUE extracts a deduplicated list from a column or table. Optional arguments control whether duplicates appear by row, by column, or with occurrence counts. It powers dropdown source lists, category tabs, and data cleanup without manual copy-paste.
Read guide →Done reading about QUERY?
Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.