2 new method of solving the problem
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/* Write your T-SQL query statement below */\nCASE 1\nselect distinct a.class from courses a\ninner join (select count(class) num, class from courses group by class) b on a.class = b.class\nwhere b.num >=5;\n\nCASE 2\nselect class from courses\ngroup by class\nhaving count(class) >= 5\n\n\n```
['MS SQL Server']