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 Completion Rates
00:00
5 left

SQL for Weekly Completion Rates

MediumSQL · PostgreSQL

Problem

Write a SQL query to analyze operational performance by joining member, queue, and outcome tables and calculating weekly completion rates.

Use the provided tables to calculate results for every queue and every week represented by valid member outcomes. Treat an outcome with status completed as completed. Include queues with no outcomes in a represented week.

Output

  1. One row per queue and week, with columns queue_name, week_start, total_outcomes, completed_outcomes, and completion_rate.
  2. Include weeks beginning Monday, order by week_start, then queue_name.
  3. Return completion rates as percentages rounded to two decimal places, using 0.00 when no outcomes exist.

Schema

members
ColumnTypeDescription
member_idPKINTUnique member identifier
member_nameVARCHAR(100)Member display name
queues
ColumnTypeDescription
queue_idPKINTUnique operational queue identifier
queue_nameVARCHAR(100)Operational queue name
outcomes
ColumnTypeDescription
outcome_idPKINTUnique outcome identifier
member_idINTMember associated with the outcome
queue_idINTQueue that handled the outcome
outcome_atTIMESTAMPTimestamp when the outcome was recorded
outcome_statusVARCHAR(30)Outcome status, such as completed, pending, or failed
Tablesmembersqueuesoutcomes
Interviewer

Your question is SQL for Weekly Completion Rates. 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.