Loading…
You're building a production-ready contact list from messy CRM data. Every field needs cleaning.
| Column | Technique | Example | ||
|---|---|---|---|---|
| full_name | TRIM + concatenation | <code>TRIM(first_name) | ' ' | TRIM(last_name)</code> |
| clean_email | LOWER + TRIM + COALESCE | <code>COALESCE(LOWER(TRIM(email)), 'N/A')</code> | ||
| clean_phone | Nested REPLACE + COALESCE | Remove -, (, ), spaces | ||
| source | LOWER + TRIM | Standardize categories |
COALESCE(value, 'N/A') returns 'N/A' when value is NULL — perfect for display-ready output.
You need to chain multiple REPLACE calls:
REPLACE(REPLACE(REPLACE(phone, '-', ''), '(', ''), ')', '')
Requirements:
Order by full_name, limit to 15.
Downloading SQL engine… (one-time)
This runs entirely in your browser and is cached for next time.