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
ExperiencesCoaching
New
Practice
Mock InterviewsTimed interview simulations with feedbackSuccess 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
Get started
Data Migration Project Experience
00:00
5 left

Data Migration Project Experience

MediumSQL · PostgreSQL

Problem

How would you describe your experience with data migration projects?

For this SQL exercise, demonstrate that experience by identifying source records from completed migration batches that are missing or inconsistent in the target system.

Output

  1. Return one row per source record with an exception.
  2. Include source_customer_id, customer_code, target_customer_id, validation_status, and source_updated_at.
  3. Exclude valid records and failed batches. Order by source_customer_id ascending.

Schema

migration_batches
ColumnTypeDescription
batch_idPKINTMigration batch identifier
batch_nameVARCHAR(100)Migration batch name
migration_dateDATEDate the batch was processed
statusVARCHAR(20)Batch processing status
source_customers
ColumnTypeDescription
source_customer_idPKINTCustomer identifier in the source system
customer_codeVARCHAR(20)Business customer code
full_nameVARCHAR(100)Customer full name in the source system
emailVARCHAR(150)Customer email address
statusVARCHAR(20)Source customer status
updated_atTIMESTAMPSource record update timestamp
batch_idINTMigration batch containing the record
target_customers
ColumnTypeDescription
target_customer_idPKINTCustomer identifier in the target system
source_customer_idINTOriginal source customer identifier
customer_codeVARCHAR(20)Business customer code in the target system
full_nameVARCHAR(100)Customer full name in the target system
emailVARCHAR(150)Customer email address in the target system
statusVARCHAR(20)Target customer status
loaded_atTIMESTAMPTarget load timestamp
Tablessource_customerstarget_customersmigration_batches
Interviewer

Whenever you're ready, walk me through your approach or go straight to the code. The requirements and the three tables are in the Question tab.

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.