Free SQL GROUP BY Generator
Build SQL GROUP BY queries visually. Add columns to group by, aggregate functions, and HAVING conditions.
Columns to group rows by. Rows with the same values in these columns will be combined.
Add aggregate functions like COUNT, SUM, AVG to calculate values for each group.
COUNT(*) counts all rows, COUNT(column) counts non-NULL values, SUM/AVG for numeric columns.
HAVING filters groups after aggregation. E.g., "only show categories with COUNT > 10"
Table name is required
-- Please enter a table name
Your data stays private
This tool runs entirely in your browser. Your table and column names are never sent to any server.
Other Tools
Try our other free tools!
Customer Testimonials
Don't just take our word for it

“I already see the value in it as an early customer and can't wait to try more ways to automate these schema diagrams. They are useful for so many reasons as we are investing more and more in great software architecture”
Arrigo Lupori
Co-Founder & Managing Director
SQL GROUP BY Guide
Need to see all your columns?
ChartDB visualizes your database schema so you can see every table and column at a glance. Know exactly what to GROUP BY before writing your query.
No credit card required