Pregunta de entrevista de Uber

SQL question with pointless followups.