Use LOWER and TRIM to normalize dirty data and aggregate
Our session source data is messy — 'google' and 'Google' are showing up as separate rows in dashboards. Can you give me a clean breakdown? Normalize the source column (lowercase + trim), then show each clean source and total session count. Order by count descending.
Each hint you reveal reduces the XP you can earn. Try the query first.
The `source` column in `fact_sessions` has mixed casing ('google' vs 'Google'). Use `LOWER(TRIM(source))` to normalize
Alias the cleaned value: `LOWER(TRIM(source)) AS clean_source` and use it in both SELECT and GROUP BY
Count sessions per clean source with `COUNT(*) AS session_count` and ORDER BY session_count DESC