Amazon interview question

Basic SQL Queries