Pregunta de entrevista de Infosys

SQL query using every concept of queries.