SQL GROUP BY & HAVING Playground

Visualize SQL grouping and aggregation with real-time animations

12 Employees 4 Departments 5 Aggregations

Controls

12
Total Rows
0
Groups
0
After HAVING
Original Data Employees Table
ID Name Department Position Location Salary
Grouped Results After GROUP BY
Generated SQL Query
SELECT department, COUNT(*)
FROM employees
GROUP BY department
Comments