Cognizant interview question

two very basic SQL queries