Cognizant Interview Question

i got a programming question and a sql joins