Domanda di colloquio di Cognizant

Sql question with joins , and select statement