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
SQL Throughput vs Budget
00:00
5 left

SQL Throughput vs Budget

MediumSQL · PostgreSQL

Problem

Write a SQL query to track weekly project throughput and compare it against budgeted hours by team.

Use the provided teams and projects data. Include every team for each week in the project date range, including teams with no completed projects.

Output

  1. One row per team and week, with team_name, week_start, completed_projects, budgeted_hours, and avg_budgeted_hours
  2. Include weeks from the earliest to latest completed project date
  3. Sort by team_name, then week_start

Schema

teams
ColumnTypeDescription
team_idPKINTUnique team identifier
team_nameVARCHAR(100)Team name
projects
ColumnTypeDescription
project_idPKINTUnique project identifier
project_nameVARCHAR(150)Project name
team_idINTTeam responsible for the project
completed_atDATEDate the project was completed
budgeted_hoursDECIMAL(10,2)Hours budgeted for the project
Tablesteamsprojects
Interviewer

Your question is SQL Throughput vs Budget. 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.