Amazon interview question

About Sql query on Join