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.
- Level
- beginner
- Time
- ~5 min
- Task
- Build the query
- Access
- Free — no account needed
Loading the practice workspace…
About this exercise
What you'll practise
Duplicate a column so you can transform the copy and keep the original.
Harbour Freight is a fictional logistics firm. HR exports its roster from the payroll system before each review cycle.
Steps
- Add
Loginas a copy ofEmail, then makeLoginlower case. - Leave
Emailexactly as it is (some addresses have capital letters). - Output
EmpID,Email,Login.
Your result must
- Email unchanged
- Login is Email in lower case
- Three columns
Input
- Roster (table)
- EmpID: text
- FirstName: text
- LastName: text
- Department: text
- City: text
- Salary: number
- StartDate: text
- Manager: text (nullable)
- Email: text
Expected output columns
EmpID (text), Email (text), Login (text)
| EmpID | Login | |
|---|---|---|
| E100 | Esi.duarte@HARBOURFREIGHT.EXAMPLE | esi.duarte@harbourfreight.example |
| E101 | priya.duarte@harbourfreight.example | priya.duarte@harbourfreight.example |
| E102 | Yara.lindqvist@HARBOURFREIGHT.EXAMPLE | yara.lindqvist@harbourfreight.example |