ADP interview question

Write SQL to get the data