Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

SQL for Weekly Team Performance

MediumSQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is SQL for Weekly Team Performance. Start with the requirements and the two tables on the right.

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.

Problem

Duolingo's Operations Manager needs a weekly view of operational task performance across teams supporting the Duolingo app, Duolingo Max, and the Duolingo English Test. Write a PostgreSQL query that joins task records with team metadata and calculates completion rates for January 2025.

Requirements

  1. Group results by Monday-based week and team.
  2. Return total tasks, completed tasks, and completion rate as a percentage rounded to one decimal place.
  3. Include only tasks assigned during January 2025 and only tasks associated with a known team.
  4. Sort results by week and team name.

Schema

teams
ColumnTypeDescription
team_idPKINTEGERUnique team identifier
team_nameVARCHAR(100)Operations team name
regionVARCHAR(50)Primary operating region
operating_modelVARCHAR(50)How the team operates
tasks
ColumnTypeDescription
task_idPKINTEGERUnique task identifier
team_idINTEGERReferences teams.team_id
task_typeVARCHAR(50)Operational task category
assigned_atDATEDate the task was assigned
statusVARCHAR(20)Current task status
Tablestasksteams
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results