Amazon interview question

Introduction, then to write a SQL query