Pregunta de entrevista de Xoriant

Query was asked on self join with nested query on sql?