Module 4
Working with columns
Choose, remove, rename, reorder and duplicate columns, and keep queries stable when columns change.
You'll be able to
- Choose columns robustly
- Rename and reorder for reports
- Decide between choosing and removing
Lessons
- 1.Choose Columns vs Remove ColumnsPick the column step that matches your intent so the query stays correct when the source schema changes.
- 2.Rename and reorder columnsProduce report-ready column names and order without changing any values.
- 3.Duplicate and combine columnsKeep raw values for auditing while producing derived columns.
- 4.When a column goes missing: MissingField optionsHandle optional and missing columns deliberately instead of hiding schema problems.
Take the working with columns quiz (8 questions)
Exercises
- beginner~5 minFree
Keep only the columns a report needs (kite shop)
Choose OrderID, Customer and Qty so the report stays the same shape even when the export gains new columns.
- beginner~5 minPro
Keep only the columns a report needs (bakery)
Choose OrderID, Customer and Qty so the report stays the same shape even when the export gains new columns.
- beginner~5 minPro
Keep only the columns a report needs (bike rental)
Choose OrderID, Customer and Qty so the report stays the same shape even when the export gains new columns.
- beginner~6 minFree
Rename and reorder columns for a finance report (kite shop)
Give columns business-friendly names and put them in the order finance expects.
- beginner~6 minPro
Rename and reorder columns for a finance report (bakery)
Give columns business-friendly names and put them in the order finance expects.
- beginner~6 minPro
Rename and reorder columns for a finance report (bike rental)
Give columns business-friendly names and put them in the order finance expects.
- beginner~5 minFree
Remove salary and email before sharing a roster (logistics)
Share a staff list with managers without salary or email columns.
- beginner~5 minPro
Remove salary and email before sharing a roster (software)
Share a staff list with managers without salary or email columns.
- beginner~5 minPro
Remove salary and email before sharing a roster (hospital)
Share a staff list with managers without salary or email columns.
- beginner~5 minFree
Duplicate a column before changing it (logistics)
IT wants a lower-case Login built from Email, while HR needs the Email column left exactly as typed.
- beginner~5 minPro
Duplicate a column before changing it (software)
IT wants a lower-case Login built from Email, while HR needs the Email column left exactly as typed.
- beginner~5 minPro
Duplicate a column before changing it (hospital)
IT wants a lower-case Login built from Email, while HR needs the Email column left exactly as typed.
- intermediate~7 minFree
Choose columns when one of them is optional (kite shop)
Some exports include a Notes column and some don't. Keep the same four columns either way.
- intermediate~7 minPro
Choose columns when one of them is optional (bakery)
Some exports include a Notes column and some don't. Keep the same four columns either way.
- intermediate~7 minPro
Choose columns when one of them is optional (bike rental)
Some exports include a Notes column and some don't. Keep the same four columns either way.
- intermediate~8 minFree
Remove every helper column whose name starts with tmp_ (survey)
The export tool adds working columns named tmp_…, and their number changes. Remove all of them by rule.
- intermediate~8 minPro
Remove every helper column whose name starts with tmp_ (payroll)
The export tool adds working columns named tmp_…, and their number changes. Remove all of them by rule.
- intermediate~7 minFree
Move the key column first and keep the rest in order (it assets)
Put AssetID first. Every other column keeps its current order, including columns added in future exports.
- intermediate~7 minPro
Move the key column first and keep the rest in order (fleet)
Put AssetID first. Every other column keeps its current order, including columns added in future exports.
- advanced~9 minFree
Rename columns from a mapping table (ledger)
Finance keeps a two-column table of old and new column names. Apply it, ignoring names the export doesn't have.
- advanced~9 minPro
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.