Pregunta de entrevista de Fractal

Normal Sql question from the query.