Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
Databricks · Databricks Data Analyst Associate

Cleaning data with SQL

Databricks Data Analyst Associate · Lesson 4 of 18 · 21:48

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

In this lesson

Prepare for the Databricks Certified Data Analyst Associate exam. In this lesson: filtering invalid rows, testing and measuring missing values with IS NULL and count, coalesce and nullif, try_cast, trim and regexp_replace, and removing repeated rows with DISTINCT or ROW_NUMBER and QUALIFY. Includes three original practice questions.

Preview the topics
  • The raw workshop table holds test jobs with negative prices. Auditors need the raw table exactly as it was loaded, and the analysts need a table without the test jobs. What should the analyst do?
  • The price column of the workshop table is text, and a few rows hold the word unknown. Converting the column to a decimal makes the whole query fail. How should the analyst convert it?
  • The workshop table holds several versions of each repair job, with a different status and updated_at on each. The analyst needs only the most recent version of every job. What should the query use?