Checking data quality with SQL queries
Tests whether a field has no value. Use WHERE field IS NULL, often with COUNT(*), to find and count incomplete records when checking data quality.
Understanding Checking data quality with SQL queries in QCE Digital Solutions Unit 2
What it does: COUNT(*) combined with IS NULL counts the records with a missing points value. GROUP BY collects matching values and HAVING COUNT(*) > 1 keeps only those repeated, which shows duplicates. No mark can be both below 0 and above 100, so AND returns nothing. OR finds marks outside the valid range. A data quality check must target the bad values. The condition is the wrong way round, so it returns correct records instead of impossible ones.
Common mistakes: NULL means no value, so it can never be equal to anything. Use IS NULL, not = NULL, to find students with a missing house. A price of 0 is a value, not a missing value. To count products with no price recorded, use WHERE price IS NULL.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 337–409) and word search (Modules 234–409).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
IS NULLFill in the Blanks
Spot the Error
Student with a class code? Join your class →