Whenever you're ready, walk me through how you'd approach this.
Explain how to use GROUP BY, WHERE, and HAVING in a single SQL query and how you troubleshoot issues in a multi-tier application.