Meta Interview Question

Two SQL query