Meta Interview Question

Two SQL and a case question