Cognizant interview question

i got a programming question and a sql joins