Treat empty text and null the same (hardware)
Some suppliers are null and some are empty text. Standardise both to "Unknown".
- Level
- intermediate
- Time
- ~7 min
- Task
- Build the query
- Access
- Free — no account needed
Loading the practice workspace…
About this exercise
What you'll practise
Tell null and empty text apart, and standardise them explicitly.
Tinker Depot (fictional) runs two warehouses for hardware supplies and exports stock levels nightly.
Steps
- In
Supplier, replace bothnulland empty text ("") withUnknown. - Keep both columns and all rows.
Your result must
- No null or empty Supplier values
- Real supplier names unchanged
- All rows kept
Input
- Stock (table)
- Item: text
- Supplier: text (nullable)
Expected output columns
Item (text), Supplier (text)
| Item | Supplier |
|---|---|
| SKU-001 Hinge | Bolt & Co |
| SKU-002 Hinge | Unknown |
| SKU-003 Drill Bit | Grainline |