Pregunta de entrevista de Ergeon

How would you write a complex SQL query?