SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Comprehensive Data Quality Scorecard

Build mastery in Finding Duplicates with this scenario-based SQL challenge and live execution support.

Problem Statement

Build a single-row scorecard that combines four quality signals into an overall percentage. Columns (in order, with these EXACT aliases): total_employees, null_salary_count, duplicate_email_rows (count of rows whose email appears more than once), records_with_any_null (count of rows where salary, department_id, OR manager_id is NULL), data_quality_pct (percentage of rows that are clean: NO duplicate email AND NO NULLs in salary/department_id/manager_id), rounded to 2 decimals.

Relevant Tables

employees

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: