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

SQL for Provider Onboarding Performance

MediumSQL · PostgreSQL

Problem

Write a SQL query to analyze provider onboarding performance by week at Lyra Health, including counts of onboarded providers, average time to onboard, and a comparison to the prior week.

Use completed onboarding records only. Include weekly metrics and prior-week comparisons for weeks represented in the data.

Output

  1. One row per onboarding week, ordered chronologically.
  2. Columns: week_start, onboarded_provider_count, avg_days_to_onboard, prior_week_provider_count, week_over_week_count_change, week_over_week_count_change_pct, prior_week_avg_days_to_onboard, and avg_days_change.
  3. Return NULL for prior-week and change fields when no prior week exists.

Schema

providers
ColumnTypeDescription
provider_idPKINTUnique Lyra provider identifier
provider_nameVARCHAR(100)Provider's display name
provider_onboarding
ColumnTypeDescription
onboarding_idPKINTUnique onboarding record identifier
provider_idINTProvider associated with the onboarding record
started_atTIMESTAMPTimestamp when onboarding started
completed_atTIMESTAMPTimestamp when onboarding was completed
statusVARCHAR(20)Onboarding status
Tablesprovidersprovider_onboarding
Interviewer

Your question is SQL for Provider Onboarding Performance. Start with the requirements and the two 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.