Pregunta de entrevista de Cognizant

two very basic SQL queries