Topfolio
Career TracksMicro Free CoursesTask CoursesPracticeInterview PracticeWork ExperienceProjects
Career TrackBlog
Support
Dashboard
Career TracksMicro Free CoursesTask Courses
SQL & Python
Interview Prep
Work ExperienceProjectsResume Feedback
CertificatesMy OrdersRefer & Earn
Join Community

Navigation

Dashboard
Learn
Career TracksMicro Free CoursesTask Courses
Practice
SQL & PythonInterview Prep
Career
Work ExperienceProjectsResume Feedback
My Stuff
CertificatesMy OrdersRefer & Earn
Join Community
Topfolio

Learn data analytics online. Real skills, real projects, real community.

courses

  • Career Tracks
  • Work Experience
  • Best Data Analyst Course in India
  • SQL Fundamentals
  • SQL Advanced
  • Python for Data
  • Micro Free Courses

practice

  • SQL Fundamentals Interview Test
  • SQL Advanced Coding Test
  • All Practice Tests

resources

  • How to Become a Data Analyst
  • SQL Interview Questions
  • Data Analyst Salary Guide
  • Free Datasets for Practice
  • SQL vs NoSQL Guide
  • Data Analyst vs Data Engineer vs Data Scientist

employers

  • Enterprise Screening
  • AI Proctoring Demo
  • Volume Pricing
  • Employer Portal

company

  • About
  • Terms
© 2026 Topfolio. All rights reserved.Made with ❤️ for aspiring analysts
  1. Home
  2. /
  3. Practice
  4. /
  5. SQL Data Cleaning

SQL Data Cleaning Practice Questions

Real tables arrive with missing values, duplicate rows and inconsistent formatting, and cleaning them is usually the first half of any analysis. NULL is not zero and not an empty string, so it needs IS NULL and COALESCE rather than an equality test, and duplicates are removed most reliably by ranking rows with ROW_NUMBER and keeping the first of each key. These questions give you dirty seeded data and ask for the clean result set.

What you will practice

  • •Test for missing values with IS NULL and supply defaults with COALESCE or NULLIF
  • •Deduplicate with ROW_NUMBER() OVER (PARTITION BY key ORDER BY updated_at) and keep row number 1
  • •Understand why NULL breaks equality comparisons, NOT IN and some aggregate counts
  • •Normalise inconsistent text with TRIM, LOWER and CASE mappings before grouping on it
  • •Validate a cleanup by comparing row counts and distinct key counts before and after

15 of 17 questions in this topic

  • COALESCE: Handle Missing Composersbeginner
  • Handle NULL Company Namesbeginner
  • Self-Join: Customers in Same Cityintermediate
  • LEFT JOIN: All Artists Including Those Without Albumsintermediate
  • Remove Duplicate Rowsbeginner
  • Count Missing Valuesbeginner
  • Drop Rows with Missing Valuesbeginner
  • Fill Missing Valuesintermediate
  • Convert Column Typesintermediate
  • Replace Values in a Columnbeginner
  • Drop a Columnbeginner
  • Clean Dataset: Drop Nulls and Duplicatesintermediate
  • Drop Nulls in Specific Columnsintermediate
  • Clip Outlier Valuesintermediate
  • North America Customer Profileintermediate