HAVING COUNT DISTINCT
The main idea is to use HAVING so we don\'t have to use the Subquery. To handle the Dublicates we can use DISTINCT within COUNT aggregation function.\n\n\nSELEC
The main idea is to use `HAVING` so we don\'t have to use the Subquery. To handle the Dublicates we can use `DISTINCT` within `COUNT` aggregation function.\n\n```\nSELECT class \nFROM courses\nGROUP by class\nHAVING(COUNT( DISTINCT student)>=5)\n```
[]