Welcome to the SQL showdown series!
What is this and how does it work?
I'm committing to publishing a SQL challenge every day for 30 ...
For further actions, you may consider blocking this person and/or reporting abuse
couple of variants here, one using old style
GROUP BY
statements:and a version (after actually googling about
GROUPING SETS
) that probably does what you were expecting:be interesting to see if you did anything different!