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 for Weekly Operational KPIs
00:00
5 left

SQL for Weekly Operational KPIs

HardSQL · PostgreSQL

Problem

Write a SQL query to combine project, resource, and performance tables and calculate weekly operational KPIs by team at CACI.

Use the supplied tables and calculate results for weeks represented in the performance data. Include week-over-week utilization change when a prior week exists.

Output

  1. One row per team and performance week.
  2. Return team, week_start, project_count, resource_count, utilization_pct, avg_performance_score, on_time_pct, and utilization_change_pct.
  3. Order by team, then week_start ascending.

Schema

projects
ColumnTypeDescription
project_idPKINTUnique project identifier
project_nameVARCHAR(100)Project name
teamVARCHAR(50)CACI operational team responsible for the project
statusVARCHAR(20)Current project status
resources
ColumnTypeDescription
resource_idPKINTUnique resource identifier
project_idINTAssigned project identifier
resource_nameVARCHAR(100)Resource name
roleVARCHAR(60)Operational role
performance
ColumnTypeDescription
performance_idPKINTUnique performance record identifier
resource_idINTMeasured resource identifier
week_startDATEMonday starting the reporting week
hours_loggedNUMERIC(8,2)Hours logged during the week
target_hoursNUMERIC(8,2)Expected hours for the week
performance_scoreNUMERIC(5,2)Weekly performance score
tasks_completedINTTasks completed during the week
tasks_on_timeINTCompleted tasks delivered on time
Tablesprojectsresourcesperformance
Interviewer

Your question is SQL for Weekly Operational KPIs. 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.