NULL vs Unknown: Why It Matters in Data Analysis
In data analysis, small misunderstandings can lead to big reporting errors. One of the most common one is confusing null with unknown.
What 'Null' means: In SQL, Null means, 'missing' or 'no value'.
It does not mean:
0
blank
Unknown
False
It simply means the value does not exist.
For example:
SELECT COUNT(*)
FROM referrals
WHERE cause_of_death IS NULL;
This tells us how many are missing information - not how many are unknown.
What 'Unknown' means: Unknown is a valid category value.
If a column cause_of_death contains:
Accident
Natural cause
Unknown
Here, Unknown means the data was intentionally recorded as unknown. That is completely different from null, which means no data was captured.
Why this difference matters:
a) Aggregations can change
COUNT(column_name) ignores NULL values.
COUNT(*) does not.
If you replace NULL with 'Unknown' without thinking, your counts and percentages will shift.
b) Business Interpretation changes
NULL - Data missing (data quality issue)
“Unknown” - Information unavailable but recorded
One is a data collection problem.The other is a legitimate category.
c) Data Cleaning Decision matters
Many analysts use:
COALESCE(cause_of_death, 'Unknown')
But this should be a business decision, not just a technical fix.
Before replacing null values, ask:
Is this truly Unknown?
Or was the data never entered?
Should we track missing data separately?
Good analysis isn't about writing complex queries. It's about understanding what the data truly represents. Sometimes the difference between 'Null' and 'Unknown' is the difference between misleading insights and meaningful ones.


