Easy solution with explanation || MySQL || Pandas || Beats 100% !!
Intuition\n Describe your first thoughts on how to solve this problem. \n- The question asks us to retrieve distinct class that has atleast 5 distinct students 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n- The question asks us to retrieve distinct class that has atleast 5 distinct students in it.\n- To otain distinct class, we **group the query by class**.\n- For the class to have atleast 5 distict students, we use **COUNT()** function.\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. In the SELECT statement, we retrieve the column **class**.\n2. In the FROM statement, we write the table name **Courses**.\n3. The **GROUP BY** clause is used to **obtain all the distinct classes**.\n4. The HAVING clause filters the classes that have atleast 5 distinct students using **HAVING COUNT(DISTINCT student) >= \'5\'** \n\n# Code\n```\n# Write your MySQL query statement below\nSELECT class\nFROM Courses\nGROUP BY class\nHAVING COUNT(DISTINCT student) >= \'5\';\n```\n```\nimport pandas as pd\n\ndef find_classes(courses: pd.DataFrame) -> pd.DataFrame:\n    courses = courses[\'class\'].value_counts().reset_index()\n    return courses[courses[\'count\'] >= 5][\'class\'].to_frame()\n```\n### Please upvote if you find my solution helpful.
['MySQL', 'Pandas']