Amazon interview question

SQL query coding and general bq