Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
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 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
Build my plan
Analyze Decision Impact by Region
00:00
5 left

Analyze Decision Impact by Region

EasySQL · PostgreSQL

Problem

You are given transaction, decision, and client data from an investment operations workflow. Write a PostgreSQL query that helps you decide whether a process change improved outcomes: for each region, return the number of decisions made, the number of successful outcomes, and the success rate for decisions made in Q2 2024. Only include regions with at least 2 decisions, and sort by success rate descending, then region ascending.

Schema

decisions
ColumnTypeDescription
decision_idPKINTPrimary key for each decision record
client_idINTClient associated with the decision
decision_dateDATEDate the decision was made
decision_typeVARCHAR(50)Type of decision
decision_outcomes
ColumnTypeDescription
decision_idINTForeign key to decisions.decision_id
outcome_statusVARCHAR(20)Outcome status such as success or failure
resolved_atTIMESTAMPWhen the outcome was recorded
clients
ColumnTypeDescription
client_idPKINTPrimary key for each client
regionVARCHAR(50)Client region
account_nameVARCHAR(100)Client account name
Tablesdecisionsdecision_outcomesclients
Interviewer

Your question is Analyze Decision Impact by Region. 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.