Pregunta de entrevista de Southwest Airlines

Explain the sql subquery and why we need it