Can you describe a complex SQL query you wrote to solve a specific business problem?

Technical