You've used your 2 free formulas on this tool

Your last result is still on screen and copied. You only need membership to keep generating. Members get unlimited formula, sparkline, regexmatch, regexreplace, and conditional formatting generators, plus courses and tutorials when you’re stuck.

Free generations 2 / 2
  • Unlimited Formula, Sparkline, RegexMatch, RegexReplace, and Conditional Formatting generators
  • Step-by-step Google Sheets courses and tutorials
  • New tools and templates as they ship

Google Sheets tool

QUERY formula generator

Describe your report in plain language and get a paste-ready =QUERY() formula for Google Sheets.

Great for filtering rows, sorting results, grouping totals, and building dashboard views.

Build your QUERY formula

Mention columns, conditions, sort order, limits, and grouping.

Blank defaults to A1.

2 free generations · Members generate without limits

Output

=QUERY(A1:D, "select A, B where C = 'Open' order by D desc", 1)

Query function examples

Real-world QUERY formula examples

Problem-solving examples you can open directly in this generator. Each example has a deep link that prefills your prompt and range.

Sales

Top 10 customers by revenue

Sort customers by revenue and return the top performers for reporting.

Formula

=QUERY(A1:B1000, "select A, B where A is not null order by B desc limit 10", 1)
Project Management

Filter open tasks due this week

View only tasks that are still open and due soon.

Formula

=QUERY(A1:D500, "select A, B, C, D where C = 'Open' and D >= date '2026-05-20' and D <= date '2026-05-27'", 1)
Finance

Monthly revenue totals by month

Aggregate transactions into monthly totals for trend dashboards.

Formula

=QUERY(A1:C5000, "select year(A), month(A), sum(C) where A is not null group by year(A), month(A) label sum(C) 'Revenue'", 1)
Marketing

Count leads by source

See lead volume by channel to evaluate acquisition performance.

Formula

=QUERY(A1:C2000, "select B, count(B) where B is not null group by B label count(B) 'Leads'", 1)
Data Cleaning

Only rows where email is blank

Find incomplete records missing required email fields.

Formula

=QUERY(A1:E1000, "select A, B, C, D, E where C is null", 1)
Inventory

Products with low inventory

List products that need replenishment before stockouts.

Formula

=QUERY(A1:D1000, "select A, B, C where C < 10 order by C asc", 1)
Sales

Average deal size by sales rep

Compare rep performance using average closed-won deal value.

Formula

=QUERY(A1:E3000, "select B, avg(D) where C = 'Closed Won' group by B label avg(D) 'Avg Deal Size'", 1)
Support

Latest 20 support tickets

Surface the most recent tickets for daily support standups.

Formula

=QUERY(A1:E5000, "select A, B, C, D, E where A is not null order by A desc limit 20", 1)
Operations

Distinct list of active clients

Create a deduplicated client list for outreach planning.

Formula

=QUERY(A1:C1200, "select A where C = 'Active' group by A label A 'Client'", 1)
SaaS

Exclude canceled subscriptions

Generate a working customer list without canceled accounts.

Formula

=QUERY(A1:F4000, "select A, B, C, D, E, F where E <> 'Canceled'", 1)
Analytics

Revenue by region and product

Build a pivot-style summary without creating a pivot table.

Formula

=QUERY(A1:D5000, "select B, C, sum(D) where B is not null group by B, C label sum(D) 'Revenue'", 1)
Content Ops

Rows containing specific keyword

Find records where notes contain a key phrase like urgent.

Formula

=QUERY(A1:D2000, "select A, B, C, D where lower(D) contains 'urgent'", 1)

Need unlimited generations across every tool?

Upgrade once, skip usage limits, and move from idea to final formula without stopping.

Unlock unlimited generations

Google Sheets Tools

Discover Google Sheets tools for anyone building spreadsheets, automations, and data workflows.