Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
SQL for Implementation Progress
00:00
5 left

SQL for Implementation Progress

HardSQL · PostgreSQL

Problem

Write a SQL query to track weekly implementation progress, joining client, project, and usage tables to calculate completion rate and identify at-risk accounts for Commure.

Use active projects and implementation usage from the reporting weeks beginning January 6, January 13, and January 20, 2025. An account is at risk when cumulative completion is below 80% of the expected completion pace.

Output

  1. One row per active project and reporting week.
  2. Columns: client_name, project_name, week_start, weekly_units, cumulative_units, completion_rate, and risk_status.
  3. Include projects with no usage, show rates as percentages, and order by client name, project name, and week start.

Schema

clients
ColumnTypeDescription
client_idPKINTUnique client identifier
client_nameVARCHAR(120)Commure client account name
regionVARCHAR(40)Client operating region
projects
ColumnTypeDescription
project_idPKINTUnique implementation project identifier
client_idINTClient owning the project
project_nameVARCHAR(120)Implementation project name
planned_unitsINTTotal implementation units planned
start_dateDATEProject start date
target_dateDATETarget completion date
statusVARCHAR(20)Current project status
usage
ColumnTypeDescription
usage_idPKINTUnique usage record identifier
project_idINTProject associated with the usage record
usage_dateDATEDate of implementation activity
units_completedINTImplementation units completed in the activity
Tablesclientsprojectsusage
Interviewer

Your question is SQL for Implementation Progress. 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
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.