Amazon Interview Question

Basic queries on joins and correlation subqueries