Very Easy || Beginners || Group by, Having, Count clause
Using Having clause\n\nselect class from courses  group by class having count(*)>=5;\n\nIn place of * , you can use class or student too.\n\nUsing sub query\n\n
**Using Having clause**\n```\nselect class from courses  group by class having count(*)>=5;\n```\nIn place of * , you can use class or student too.\n\n**Using sub query**\n```\nselect class\nfrom \n    (select class, count(distinct student) as num\n    from courses\n    group by class) as temp\nwhere num >= 5;\n```
[]