100 % || SIMPLE & INTUITIVE || SQL QUERY || ( Well - Defined ) || HAVING || AGGREGATION || Beats 91%
Intuition\n Describe your first thoughts on how to solve this problem. \nSELECT class ---> Show the column class for Courses Table...\nFROM Courses ---> Associa
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nSELECT class ---> Show the column class for Courses Table...\nFROM Courses ---> Association from Courses Table...\nGROUP BY class --> Grouping w.r.t. class...\nHAVING COUNT(student) >= 5; --> Aggregation function count to count students which should be greater than 5 acc. to the problem...\n# Approach\n<!-- Describe your approach to solving the problem. -->\nUsing Fundamentals of SQL...\n# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nSELECT class \nFROM Courses \nGROUP BY class \nHAVING COUNT(student) >= 5;\n```
['Database', 'MySQL']