Southwest Airlines interview question

Explain the sql subquery and why we need it