internalsGet Pro

Module 02 · Lesson 2 of 12Pro

NULLs and messy values in SQL

Level
Intermediate
Topic
SQL for data engineering
Reading time
16 min

When you finish this page you can

  1. Predict how a NULL changes the result of WHERE, NOT IN, COUNT and AVG, and rewrite each query so missing values can’t drop out unseen.
  2. Find empty strings, sentinel values and spelling variants in a column, and clean them once with a mapping table that keeps the raw value.
  3. Decide, per column, whether a value the pipeline can’t read should stop the night or be filled and counted.
  1. Design: a first analytics pipeline for an online store30 min
  2. Join pitfalls: duplicated and missing rows16 min

Two halves that don’t add up

It’s 08:15 on Tuesday, 10 November, at . Kartly is an online store in India. Every night its data team copies the store’s orders and click events into an analytical database, and Daniel, who leads finance reporting, reads the numbers from there each morning.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan