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
Monthly Team Performance Cost Analysis
00:00
5 left

Monthly Team Performance Cost Analysis

MediumSQL · PostgreSQL

Problem

You are given operational activity and cost data from a brokerage operations workflow. Write a PostgreSQL query to report monthly performance by team for Gallagher teams, combining activity records with monthly team costs. Your result should show each team and month with total completed volume, average turnaround time in hours, and cost per unit. Teams with activity but no matching monthly cost should still appear, and cost per unit should safely handle missing or zero volume.

Schema

gallagher_activity
ColumnTypeDescription
activity_idPKINTUnique activity record identifier
team_idINTReference to the operations team
case_idVARCHAR(20)Operational case reference
completed_atTIMESTAMPTimestamp when the activity was completed
turnaround_hoursNUMERIC(8,2)Turnaround time in hours
units_processedINTNumber of units completed in the activity
statusVARCHAR(20)Activity status
gallagher_team_costs
ColumnTypeDescription
cost_idPKINTUnique cost record identifier
team_idINTReference to the operations team
cost_monthDATEFirst day of the month for the cost record
monthly_costNUMERIC(12,2)Total monthly operating cost for the team
gallagher_teams
ColumnTypeDescription
team_idPKINTUnique team identifier
team_nameVARCHAR(100)Operations team name
Tablesgallagher_activitygallagher_team_costsgallagher_teams
Interviewer

Your question is Monthly Team Performance Cost Analysis. 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.