SQL GROUP BY example

Aggregate sales by category with SQL GROUP BY, COUNT, and SUM.

The query groups detail rows into category summaries and orders those summaries by total revenue.

Write a query, load data, or pick a learning example.

Run with Cmd/Ctrl+Enter