Meta interview question

Two SQL questions and one case question.