SQL / ZIP

SQL Data Quality Checks

Find null keys, duplicates, invalid amounts, and broken relationships.

sql-data-quality-checksZIP
-- 01. Find duplicate keysSELECT order_id, COUNT(*)FROM ordersGROUP BY order_idHAVING COUNT(*) > 1;

Preview uses illustrative sample content.

What’s inside

  • Five read-only quality checks
  • A SQLite sample dataset with intentional issues
  • Expected results and adaptation notes

Make it yours

  1. Extract the ZIP and read README.md. Use a disposable SQLite database to load sample-data.sql.
  2. Run quality-checks.sql and compare the results with expected-results.md.
  3. For your own data, change the table names, columns and rules. Run only the SELECT checks against your source; the sample setup creates demonstration tables.
Format & compatibility

Example setup and checks validated with SQLite. Adapt data types and schema names for other SQL engines.