Rename columns from a mapping table (crm)
Finance keeps a two-column table of old and new column names. Apply it, ignoring names the export doesn't have.
- Level
- advanced
- Time
- ~9 min
- Task
- Build the query
- Access
- Pro
Checking your access…
About this exercise
What you'll practise
Drive renaming from data (a mapping table) and tolerate mappings that don't apply.
The scenario, sample data, step list, hints and solution open with Pro. Grading checks your query against hidden data as well as the visible sample, so a query that only fits the sample doesn't pass.
Input
- Export (table)
- cust_name: text
- acct_mgr: text
- created: text
- e_mail: text
- notes: text
- Mapping (table)
- Old: text
- New: text
Expected output columns
Customer (text), Account Manager (text), Created On (text), Email (text), notes (text)