Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Clean and Merge Mismatched Columns

EasySQL & Data Manipulation00:00
I
Practice interviewer
Your interviewer
In session
I
Interviewer

Welcome to your interview.

The question is on your right: Clean and Merge Mismatched Columns. Take a moment with it first.

Talk your thinking through with me if you like - when you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes). Discussion and graded submissions share your five interviewer interactions, so spend them well.

You need to log in / sign up to chat or submit.

Problem

Context

In Lyft operations workflows, raw exports from tools like Lyft Console or support intake sheets often contain the same business field in two columns with inconsistent formatting. Interviewers want to see whether you can standardize messy values before combining them into a single usable column.

Core question

Explain how you would clean and merge two columns when they represent the same information but use different formats. For example, one column may contain phone numbers with punctuation while another stores digits only, or one column may have city names with inconsistent casing and whitespace.

Address these points:

  1. How you would profile the data before writing the transformation
  2. How you would normalize each column into a common format
  3. How you would choose which cleaned value to keep when both columns are populated
  4. How you would handle NULLs, blanks, and conflicting values
  5. How you would validate that the merged result is correct

Scope guidance

Keep the answer practical and SQL-focused. The interviewer is not looking for a full ETL architecture discussion; they want a clear PostgreSQL-based approach using common cleaning functions and simple decision logic.