Meta interview question

SQL question + Case + Stats