Standard

GROUP BY/HAVING Query Builder

Pick grouping columns, add aggregate functions and a HAVING condition, and get a ready GROUP BY query.

Advertisement

About this tool

Builds a GROUP BY query from a table, a list of grouping columns and one or more aggregate expressions (COUNT, SUM, AVG, MIN, MAX), each with its own output alias. The HAVING condition is left as free text — HAVING filters on the results of the aggregates themselves (e.g. SUM(amount) > 1000), which is awkward to constrain with dropdowns, so type it exactly as it should appear in the query.