Amazon interview question

SQL Based Scenario based Bar raiser