Amazon interview question

SQL queries followed by HR round