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
SLA Attainment From Support Data
00:00
5 left

SLA Attainment From Support Data

HardSQL · PostgreSQL

Problem

Given tickets, agents, and time-to-resolution tables, derive weekly SLA attainment and identify the top three bottlenecks for NVIDIA support operations.

Calculate attainment for tickets with a non-null resolution time. Treat a ticket as attained when its resolution time is within its SLA target. Define bottlenecks as agent teams with the most SLA breaches in each week; unmatched agents should appear as Unassigned.

Output

  1. One row per weekly bottleneck, with up to three rows per week.
  2. Include week_start, total_resolved_tickets, sla_attained_tickets, sla_attainment_rate, bottleneck_rank, bottleneck_team, and sla_breach_count.
  3. Sort by week_start, then bottleneck_rank ascending. Break tied bottlenecks alphabetically by team name.

Schema

tickets
ColumnTypeDescription
ticket_idPKINTUnique support ticket identifier
agent_idINTAssigned support agent identifier
created_atTIMESTAMPTimestamp when the ticket was created
sla_hoursDECIMAL(8,2)Maximum allowed resolution time in hours
statusVARCHAR(30)Current ticket status
agents
ColumnTypeDescription
agent_idPKINTUnique support agent identifier
agent_nameVARCHAR(100)Support agent name
team_nameVARCHAR(80)Support team assigned to the agent
regionVARCHAR(40)Agent operating region
time_to_resolution
ColumnTypeDescription
ticket_idPKINTResolved ticket identifier
resolution_hoursDECIMAL(8,2)Elapsed time from creation to resolution in hours
resolved_atTIMESTAMPTimestamp when the ticket was resolved
Tablesticketsagentstime_to_resolution
Interviewer

Your question is SLA Attainment From Support Data. 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.