TRIM and GROUP BY HAVING to detect duplicate values
Running vendor master dedup. Find vendor names that appear more than once after trimming whitespace and lowercasing. Show `normalized_name` and `dup_count`. I suspect at least one trailing-space duplicate is hiding in there.
Each hint you reveal reduces the XP you can earn. Try the query first.
`SELECT LOWER(TRIM(vendor_name)) AS normalized_name, COUNT(*) AS dup_count FROM dim_vendors`.
Group by the normalized name, then `HAVING COUNT(*) > 1`.
Exactly one vendor has a trailing-space twin.