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
Ensuring Data Integrity Across Sources
00:00
5 left

Ensuring Data Integrity Across Sources

HardSQL · PostgreSQL

Problem

How do you handle data integrity issues when merging information from disparate sources like EDW and local Access databases?

Using the supplied EDW and Access tables, write a query that produces one reconciled row per asset code and identifies records requiring review.

Output

  1. Return asset_code, the EDW-preferred merged asset attributes, integrity_status, and the number of Access records received.
  2. Include matched, conflicting, EDW-only, and Access-only records.
  3. Order by asset_code ascending.

Schema

edw_assets
ColumnTypeDescription
edw_asset_idPKINTEDW asset record identifier
asset_codeVARCHAR(20)Business identifier used to match sources
asset_nameVARCHAR(100)Standardized asset name
lifecycle_statusVARCHAR(30)Current lifecycle status
site_codeVARCHAR(20)Facility or site identifier
last_verified_dateDATEDate the EDW record was last verified
access_asset_records
ColumnTypeDescription
access_record_idPKINTLocal Access record identifier
asset_codeVARCHAR(20)Business identifier supplied by the local database
asset_nameVARCHAR(100)Asset name from the local database
lifecycle_statusVARCHAR(30)Local lifecycle status
site_codeVARCHAR(20)Local facility or site identifier
imported_atTIMESTAMPTimestamp when the record was imported
Tablesedw_assetsaccess_asset_records
Interviewer

Your question is Ensuring Data Integrity Across Sources. Start with the requirements and the two 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.