Southwest Airlines Interview Question

Explain the sql subquery and why we need it