Google Sheets QUERY builder
Fill in your columns to get a QUERY formula that counts rows per group, with the quoting already handled.
Why use column letters instead of header names?
QUERY refers to columns by letter when the data is a normal range, so a header name in the query text causes an error. If you insert a column, update the letters too, because text inside the query string doesn't shift the way cell references do.
How was this builder checked?
Tests confirm the output matches the formula in our guide and that quoting follows the QUERY rules, but the generated formulas haven't been run in Google Sheets. Compare the first result with a manual count. For sample data and expected output, see Count open tasks by owner with Google Sheets QUERY.