Ergeon Interview Question

How would you write a complex SQL query?