Pregunta de entrevista de Oviva

Question was related SQL query