EASY MYSQL SOLUTION
PLEASE UPVOTE MY SOLUTION IG YOU LIKE IT\n# CONNECT WITH ME\n# https://www.linkedin.com/in/pratay-nandy-9ba57b229/\n# https://www.instagram.com/pratay_nandy/\n#
# **PLEASE UPVOTE MY SOLUTION IG YOU LIKE IT**\n# **CONNECT WITH ME**\n# **[https://www.linkedin.com/in/pratay-nandy-9ba57b229/]()**\n# **[https://www.instagram.com/pratay_nandy/]()**\n# Approach\nSQL Query Approach:\n\nSelect Statement: Start with the SELECT statement to specify the columns you want in the result. In this case, you want to select the "class" column.\n\n- SELECT class\nFrom Clause: Specify the table from which you want to retrieve data. In this case, it\'s the "courses" table.\n\n- FROM courses\nGroup By Clause: Use the GROUP BY clause to group the rows by the "class" column. This groups all rows with the same "class" value together.\n\n- GROUP BY class\nHaving Clause: The HAVING clause is used to filter the grouped results. It allows you to apply conditions to groups. Here, you want to keep only those groups (i.e., classes) that have at least 5 students. So, you specify COUNT(student) >= 5 in the HAVING clause.\n\n\n- HAVING COUNT(student) >= 5\nResult: After executing this SQL query, you will get a result set that contains the "class" values for classes that meet the specified condition (having at least 5 students).\n\nThe result will be a list of class names that satisfy the condition.\n\nHere\'s the complete SQL query:\n\n- SELECT class FROM courses GROUP BY class HAVING COUNT(student) >= 5\n\nWhen you execute this query, it will return a list of class names where there are at least 5 students enrolled in each class.\n\n\n\n\n\n\n# Code\n```\nselect class\nfrom courses\ngroup by class\nhaving count(student) >= 5\n```
['Database', 'MySQL']