Pregunta de entrevista de Amazon

One more basic SQL query which uses subquery