Amazon interview question

SQL queries simple and basic