Cummins interview question

SQL Join Query between 2 tables