ADP interview question

sql quarries