Amazon interview question

Tell me about the most complex SQL query you have used.