Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan
Handle Missing Data Across Retail Datasets
00:00
5 left

Handle Missing Data Across Retail Datasets

MediumSQL · PostgreSQL

Problem

Describe how you handle missing or inconsistent data when joining multiple large-scale retail datasets at dm-drogerie markt.

Use the provided sales, product, and store tables to demonstrate the approach with a query. Normalize join keys, preserve every sales record, and identify whether each product and store matched successfully.

Output

  1. One row per sales transaction, ordered by transaction_id ascending.
  2. Include transaction_id, product_id, product_name, store_id, store_name, product_join_status, store_join_status, and sales_amount.
  3. Label each join as matched or missing, treating NULL and blank keys as missing.

Schema

retail_sales
ColumnTypeDescription
transaction_idPKINTUnique retail transaction identifier
raw_product_codeVARCHAR(20)Product reference received from the sales feed
raw_store_codeVARCHAR(20)Store reference received from the sales feed
sales_amountDECIMAL(10,2)Transaction amount, including returns and missing values
products
ColumnTypeDescription
product_idPKINTCanonical product identifier
product_codeVARCHAR(20)Canonical product code
product_nameVARCHAR(100)Product description
categoryVARCHAR(50)Product category
stores
ColumnTypeDescription
store_idPKINTCanonical store identifier
store_codeVARCHAR(20)Canonical store code
store_nameVARCHAR(100)Store name
regionVARCHAR(50)Store region
Tablesretail_salesproductsstores
Interviewer

Your question is Handle Missing Data Across Retail Datasets. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
Sign up free to run your codeLog inLn 1
Run your query to see results here.