Amazon interview question

Some simple SQL questions