Pregunta de entrevista de Cognizant

Few SQL queries, Code to implement polymorphism