Cognizant Interview Question

Write a inner join sql query for a logic