FlexSalary interview question

SQL joins in varying complexity