GuideBeginner

Data Quality And Sql Testing

Learn to measure and guarantee data quality with SQL, and to test the SQL itself. Data quality shows up in a large share of data job postings: it's about detecting incomplete, invalid, duplicate, and inconsistent data, encoding business rules as queries that return the violations, and proving your queries and migrations produce the correct result. You work on Reservo's database, populated on purpose with real dirty data, and come out knowing how to build a data quality checking system that runs and reports.

64
lessons
8
modules
English · Spanish
available in
Yes
certificate
Free
access
NIEVA

Outcomes

What you'll be able to do

  • Understand the dimensions of data quality (completeness, validity, uniqueness, consistency) and the difference between preventing with a constraint and detecting with a check
  • Measure completeness: analyze NULLs, calculate the percentage of completeness per column, and tell apart 0, NULL, and an empty string
  • Detect validity: values out of range or domain, and invalid date formats, expressed as a SELECT that represents the rule
  • Find duplicates with GROUP BY... HAVING COUNT(*) > 1, including "near-duplicates," and decide which record to keep
  • Hunt down inconsistencies: orphaned rows with no referential integrity, fields that don't match each other, and totals that don't add up
  • Encode business rules as SQL assertions that return the violations, where zero rows means everything is healthy
  • Test the SQL itself: fixtures with an expected result, PASS/FAIL assertions, and testing a migration by comparing before and after
  • Build Reservo's complete data quality system: checks per dimension, an aggregated health report, and tests for the key queries

Before you start

What you need to bring

It's for you if...

  • Data analysts and devs who inherit databases with dirty data and need a systematic process to detect it
  • Anyone preparing for data roles where data quality shows up explicitly in the job posting
  • Teams who encode business rules, like "a refund never exceeds the charge," but don't verify them with SQL
  • Devs who want to test their queries and migrations before trusting the result

Requirements and materials

  • Basic SQL: SELECT, WHERE, GROUP BY
  • Python 3 installed (the `sqlite3` module ships with the standard library)
  • Having seen JOINs and CTEs is recommended, or taking the advanced SQL guide alongside this one

Content

The syllabus, module by module

Open any of them to see its lessons.

Where it fits

This guide is part of something bigger

It's studied inside these programs, with support and dates.

Common questions

What people usually ask

Start whenever you like

Reviews

What students say

These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.

No approved reviews yet.

Be the first to share your experience!