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 Staffing Performance
00:00
5 left

SQL for Staffing Performance

MediumSQL · PostgreSQL

Problem

Write a SQL query to analyze staffing performance by client and week at Adecco General Staffing, including fills, open requisitions, and fill rate trends over time.

Use the reporting period from January 1 through February 4, 2024. Include clients with requisitions during the period and calculate fill rate as fills divided by fills plus open requisitions.

Output

  1. One row per client and Monday-starting week, including weeks with no activity.
  2. Columns: client_name, week_start, fills, open_requisitions, fill_rate, prior_week_fill_rate, and fill_rate_change.
  3. Include zero counts, use NULL when the fill-rate denominator is zero, and order by client name and week.

Schema

clients
ColumnTypeDescription
client_idPKINTUnique client identifier
client_nameVARCHAR(100)Adecco General Staffing client name
service_regionVARCHAR(50)Client service region
requisitions
ColumnTypeDescription
requisition_idPKINTUnique staffing requisition identifier
client_idINTClient requesting staff
opened_dateDATEDate the requisition opened
closed_dateDATEDate the requisition closed
requisition_statusVARCHAR(20)Current requisition status
role_nameVARCHAR(80)Role requested by the client
placements
ColumnTypeDescription
placement_idPKINTUnique placement identifier
requisition_idINTRequisition fulfilled by the placement
worker_external_idVARCHAR(30)External worker identifier
fill_dateDATEDate the placement was filled
placement_statusVARCHAR(20)Placement status
Tablesclientsrequisitionsplacements
Interviewer

Your question is SQL for Staffing Performance. 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.