Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Analyze Decision Impact by Region

HarbourVest PartnersMediumSQL · PostgreSQL00:00
HarbourVest Partners
Your interviewer · Operations Manager
In session
Interviewer

Welcome to the SQL screen for the Operations Manager role at HarbourVest Partners.

The question is on your right: Analyze Decision Impact by Region. Read through the requirements and the three tables first.

Would you like to talk through your approach, or are you ready to start coding?

Talking through your plan before coding is graded well.

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
Your solutionPostgreSQL
Run as often as you like, then submit when the output looks right.
Run a query to see results