Classes More Than 5 Students
You can write a MySQL query that groups the classes by name and filters those having at least five students. Here’s the query:
|
|
Explanation:
- The
GROUP BY
clause groups the rows by the class. - The
HAVING
clause filters the classes by the condition that the count of students in the class must be at least five.