Amazon interview question

All about SQL statements, not too much difficut.