I had an interview recently where they asked me this SQL question:
You have two tables: Users (id, name, email) and Orders (id, user_id, amount, created_at). Write a SQL query to find the top 3 users who have spent the most in total on orders in the last 6 months."
It caught me off guard a bit. How would you approach this?