I’ve been playing around with the GROUP BY syntax trying to understand it better.
In the exercise for CASE WHEN, the “passing” syntax requires “GROUP BY 1”.I attempted to change that to GROUP BY 2 and then GROUP BY COUNT() but get an error code stating aggregate functions are not allowed in the GROUP BY clause.
My confusion comes from my understanding that the CASE WHEN process is an aggregate function as well. Why does the CASE WHEN language work with GROUP BY but COUNT() does not.
Replace this line with your code.
<do not remove the three backticks above>