Cognizant interview question

basic SQL queries.