Find duplicate customers by email address using GROUP BY HAVING
Something's off with our customer numbers. Finance says we have 500 customers but the dedup count looks different. Can you find any duplicate customers in `dim_customers`? Show me the `email` addresses that appear more than once, and how many times each one shows up. I need this before the investor call.
Each hint you reveal reduces the XP you can earn. Try the query first.
Group `dim_customers` by `email` and count: `SELECT email, COUNT(*) AS duplicate_count FROM dim_customers GROUP BY email`
Use `HAVING COUNT(*) > 1` to keep only emails that appear more than once — HAVING filters after GROUP BY (WHERE can't filter aggregates)
Add `ORDER BY duplicate_count DESC` to see the most duplicated emails first