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!

SQL Syntax Checker

Validate SQL syntax across multiple database dialects

SQL Formatter

Beautify and format SQL queries with customizable options

Text to SQL

Convert natural language to SQL queries with AI

SQL Minifier

Compress SQL queries by removing whitespace

SQL Compare

Compare SQL queries and see differences

DBML to SQL

Convert DBML schemas to SQL DDL

SQL to DBML

Convert SQL DDL to DBML schemas

SQL Query Explainer

Explain SQL queries in plain English with AI

SQL Dialect Converter

Convert SQL between different database dialects

SQL UPDATE Generator

Build UPDATE queries with a visual form builder

SQL COALESCE Generator

Handle NULL values with COALESCE expressions

SQL LIKE Tester

Test LIKE patterns with % and _ wildcards

SQL DELETE Generator

Build DELETE queries with safety warnings

SQL DISTINCT Generator

Find unique values with SELECT DISTINCT

SQL CASE WHEN Generator

Build conditional expressions with CASE WHEN

SQL JOIN Generator

Build multi-table JOIN queries visually

SQL ORDER BY Generator

Build sorting queries with ORDER BY

SQL BETWEEN Generator

Build range queries with BETWEEN

SQL COUNT Generator

Build COUNT queries with GROUP BY

SQL SUBSTRING Generator

Extract string parts with SUBSTRING

SQL HAVING Generator

Filter grouped results with HAVING clause

SQL IN Generator

Filter with IN and NOT IN clauses

SQL REPLACE Generator

Find and replace text in columns

Customer Testimonials

Don't just take our word for it

Arrigo Lupori
“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.

See all columns & typesUnderstand table relationshipsImport from any database
Try ChartDB Free

No credit card required