Amazon interview question

Technical: Average difficulty SQL (unions, joins, subqueries)