Pregunta de entrevista de Uber

SQL questions that were tricky to solve, although not programmatically difficult.