Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Identify Driver Churn Risk Factors

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

Your question is Identify Driver Churn Risk Factors. Start with the requirements and the three 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

Write a PostgreSQL query that identifies likely drivers of driver churn in a Lyft market. Define churn as a driver who completed at least one ride in the month before the latest month in the dataset, then completed zero rides in the latest month. Return churn rate by market_id, tenure_bucket, support_bucket, and utilization_bucket.

Schema

Tables
  • driver_monthly_activity(driver_id, market_id, activity_month, rides_completed, hours_online, earnings_usd)
  • driver_support_contacts(contact_id, driver_id, contact_date, contact_reason)
  • market_monthly_supply(market_id, supply_month, avg_eta_minutes, bonus_hours)
Tablesdriver_monthly_activitydriver_support_contactsmarket_monthly_supply
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results