Amazon interview question

sql coding questions on simple join