Leetcode 596. Classes More Than 5 Students | SQL Solution Explained
Вставка
- Опубліковано 9 лют 2025
- In this problem, you need to write an SQL query to find all classes that have more than 5 students. The input table contains two columns:
class: The name of the class.
student: The name of the student.
Return a result with only the class names, ensuring no duplicates. Learn how to use SQL aggregation (GROUP BY) and filtering (HAVING) to efficiently solve this challenge!
#SQL
#leetcodesql
#ClassesMoreThan5
#groupby
#HavingClause
#sqlpractice
#DatabaseQuery