SQL Playground
TutorialsPlayground
SQL FormatterSQL MinifierSyntax ValidatorJSON to SQLCSV to SQLSQL to JSONER Diagram Generator
Daily ChallengeInterviewsCheat SheetBlog

© 2026 SQL Playground. Built for developers.

PrivacyTermsAboutRSS Feed
SQL Playground
TutorialsPlayground
SQL FormatterSQL MinifierSyntax ValidatorJSON to SQLCSV to SQLSQL to JSONER Diagram Generator
Daily ChallengeInterviewsCheat SheetBlog
Initializing...
Chapter 4: Aggregation
4-2
Your Progress

GROUP BY

The GROUP BY statement groups rows that have the same values into summary rows. It is often used with aggregate functions.

SELECT category, COUNT(*) 
FROM products 
GROUP BY category;

Task: Count how many orders exist for each status in the orders table.

Loading...
Run a query to see results