Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Profile Incomplete Customer Records

Easy
SQL & Data ManipulationData WranglingCase WhenQualityAsked 1 times

Problem

You are given a customer profile table from Best Buy account data. Some records are incomplete or inconsistent: email may be missing, phone may be blank, city may be null, and loyalty tier values may not follow the expected standard. Write a PostgreSQL query that returns one row per customer_id with a data_quality_status of Complete, Incomplete, or Inconsistent. Treat a record as Incomplete if email, phone, or city is null or an empty string. Treat a record as Inconsistent if loyalty_tier is not one of My Best Buy, My Best Buy Plus, or My Best Buy Total. If both issues exist, label the record as Inconsistent. Return the results ordered by customer_id.

Schema

customer_profiles
ColumnTypeDescription
customer_idPKINTUnique customer identifier
full_nameVARCHAR(100)Customer full name
emailVARCHAR(150)Customer email address
phoneVARCHAR(20)Customer phone number
cityVARCHAR(100)Customer city
loyalty_tierVARCHAR(50)Best Buy loyalty membership tier
Practicing as: Customer Insights Analyst interview at Best Buy

Hi, I'll play your Best Buy interviewer for the Customer Insights Analyst role. Candidates describe these interviews as mostly positive and on the easier side, so expect me to be friendly and conversational. Take your time with the question above and answer like we're in the room.

You are practicing as a guest. Sign up free to run your code against the sample data. Your draft stays right here.

Sign up freeI have an account
SELECT ...
FROM ...
JOIN ... ON ...
GROUP BY ...
HAVING ...
ORDER BY ... DESC;
Sign up to unlock solutions
Best Buy Customer Insights Analyst Interview Questions
Next questions
Ramsey SolutionsResolve Conflicting Customer AttributesMediumAlphaSenseNormalize Messy CRM Contact DataMediumRevolutHandling Missing Customer DataMedium