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
Weekly Operations SQL Analysis
00:00
5 left

Weekly Operations SQL Analysis

MediumSQL · PostgreSQL

Problem

Write a SQL query to analyze weekly operational performance by team, including total volume, average turnaround time, and week-over-week change.

Use completed operational requests and calculate turnaround time from creation to completion. Include only weeks represented by completed requests, and calculate the percentage change in volume from the previous available week for each team.

Output

  1. One row per team and week, with team_name, week_start, total_volume, avg_turnaround_hours, and week_over_week_volume_change_pct.
  2. Sort by team_name, then week_start.
  3. Return NULL for the first available week of each team or when a percentage change cannot be calculated.

Schema

teams
ColumnTypeDescription
team_idPKINTUnique team identifier
team_nameVARCHAR(100)Operational team name
regionVARCHAR(50)Team operating region
operational_requests
ColumnTypeDescription
request_idPKINTUnique operational request identifier
team_idINTTeam assigned to the request
created_atTIMESTAMPRequest creation timestamp
completed_atTIMESTAMPRequest completion timestamp
statusVARCHAR(20)Current request status
Tablesteamsoperational_requests
Interviewer

Your question is Weekly Operations SQL Analysis. Start with the requirements and the two 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.