Cognizant Interview Question

two very basic SQL queries