7. NULL Values: Missing Data Done Right
7.6 Practice: Missing Order Notes and Empty Ticket Fields
Why. Practice both datasets so NULL skills transfer.
What. Find, label and count NULLs on notes and ticket fields.
How. IS NULL → IFNULL for display → COUNT comparison.
Steps
- Missing notes count.
- Tickets with NULL priority.
- Tickets with NULL amount_eur.
Examples
Example 1 · dataset: interview_mini
SELECT COUNT(*) AS null_amount
FROM tickets
WHERE amount_eur IS NULL;Output
| null_amount |
|---|
| 1 |
Meaning. One careful money NULL in the mini set.
Example 2 · dataset: interview_mini
SELECT agent, COUNT(*) AS openish
FROM tickets
WHERE status = 'Open'
GROUP BY agent;Output
| agent | openish |
|---|---|
| Elena | 2 |
| James | 1 |
| Omar | 1 |
| Priya | 1 |
Meaning. Open tickets by agent (status is never NULL here).
Ravindra Bagale's Tip
Chala mitrano — write one interview answer about = NULL vs IS NULL tonight.
Ravindra Bagale's Tip – मराठी
चला मित्रांनो — आज रात्री = NULL vs IS NULL वर एक interview उत्तर लिहा.
Ravindra Bagale's Tip – हिंदी
चलो दोस्तों — आज रात = NULL vs IS NULL पर एक इंटरव्यू जवाब लिखें।