Pergunta de entrevista da empresa Southwest Airlines

Explain the sql subquery and why we need it