Pregunta de entrevista de EveryMatrix

Asked to write a SQL query.