GROUP BY Clause
Groups rows with same values for aggregate calculations.
sql
1SELECT course, COUNT(*) AS student_count
2FROM students
3GROUP BY course;| course | student_count |
|---|---|
| Python | 8 |
| JavaScript | 5 |
| Ruby | 4 |

Groups rows with same values for aggregate calculations.
1SELECT course, COUNT(*) AS student_count
2FROM students
3GROUP BY course;| course | student_count |
|---|---|
| Python | 8 |
| JavaScript | 5 |
| Ruby | 4 |