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
Diagnose Moody's Output Data Mismatches
00:00
5 left

Diagnose Moody's Output Data Mismatches

MediumSQL · PostgreSQL

Problem

You are given a client reconciliation workflow where a Moody's tool output must be compared against the client's internal data. Write a PostgreSQL query that returns, for each run date and mismatch type, how many records are affected. Classify each record as missing_in_client, missing_in_moodys, value_mismatch, or match based on the available keys and field values.

Use the provided moodys_tool_output and client_internal_data tables. Keep the result ordered by run date and mismatch type so the output is easy to review during investigation.

Schema

moodys_tool_output
ColumnTypeDescription
run_dateDATEMoody's tool run date
record_idINTMoody's record identifier
client_idVARCHAR(20)Client-facing identifier
risk_scoreINTMoody's computed risk score
statusVARCHAR(20)Moody's status value
client_internal_data
ColumnTypeDescription
run_dateDATEClient extract date
record_idINTClient record identifier
client_idVARCHAR(20)Client-facing identifier
risk_scoreINTClient risk score
statusVARCHAR(20)Client status value
Tablesmoodys_tool_outputclient_internal_data
Interviewer

Your question is Diagnose Moody's Output Data Mismatches. 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.