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
Top Technicians Query
00:00
5 left

Top Technicians Query

MediumSQL · PostgreSQL

Problem

Write a query to identify top-performing service technicians based on historical job data at ServiceTitan. Include only technicians with at least two completed jobs, and rank them by total completed job revenue.

Output

  1. One row per technician in the top three ranking positions, including ties
  2. Columns: technician_name, completed_jobs, total_revenue, average_rating, and performance_rank
  3. Sort by performance_rank ascending, then technician_name ascending

Schema

technicians
ColumnTypeDescription
technician_idPKINTUnique technician identifier
technician_nameVARCHAR(100)Technician display name
tradeVARCHAR(50)Primary service trade
job_assignments
ColumnTypeDescription
assignment_idPKINTUnique assignment identifier
job_idINTAssigned job identifier
technician_idINTAssigned technician identifier
assigned_atDATEDate the job was assigned
jobs
ColumnTypeDescription
job_idPKINTUnique job identifier
statusVARCHAR(20)Current job status
completed_atDATEDate the job was completed
revenueNUMERIC(12,2)Revenue generated by the job
customer_ratingNUMERIC(2,1)Optional customer rating from one to five
Tablestechniciansjob_assignmentsjobs
Interviewer

Your question is Top Technicians Query. 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.