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
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
Troubleshooting API Data Discrepancies
00:00
5 left

Troubleshooting API Data Discrepancies

MediumSQL · PostgreSQL

Problem

Can you explain how you would troubleshoot a data discrepancy between Socure’s API and a client’s internal records?

Use the provided Socure API result and client record tables to identify records whose latest completed API decision differs from the client’s internal decision, including records present on only one side.

Output

  1. One row per discrepancy, with client_id, record_id, api_decision, internal_decision, api_received_at, internal_updated_at, and discrepancy_type.
  2. Include missing-side records and decision mismatches. Sort by client_id ascending.

Schema

socure_api_results
ColumnTypeDescription
request_idPKVARCHAR(20)Unique Socure API request identifier
client_idVARCHAR(20)Client record identifier supplied to Socure
decisionVARCHAR(20)Decision returned by the Socure API
api_statusVARCHAR(20)Processing status of the API request
received_atTIMESTAMPTZTime the API result was received
client_records
ColumnTypeDescription
record_idPKVARCHAR(20)Client system record identifier
client_idVARCHAR(20)Identifier used to reconcile with Socure
internal_decisionVARCHAR(20)Decision stored in the client system
updated_atTIMESTAMPTZTime the client record was last updated
Tablessocure_api_resultsclient_records
Interviewer

Your question is Troubleshooting API Data Discrepancies. 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.