Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Analyzing Operations With SQL

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

Your question is Analyzing Operations With SQL. 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 SQL query to analyze operational performance by joining member, claims, and provider tables, then calculate monthly completion rates and identify the top underperforming regions. Treat claims with status completed as completed, and use service_date to determine the month. Return the two lowest-performing regions for each month, breaking ties by region name.

Output

  1. One row per selected month and region
  2. Columns: claim_month, region, total_claims, completed_claims, completion_rate, and underperformance_rank
  3. Include only the two lowest-ranked regions in each month, ordered by month, rank, and region

Schema

members
ColumnTypeDescription
member_idPKINTUnique member identifier
member_nameVARCHAR(100)Member name
plan_nameVARCHAR(100)AmeriHealth Caritas plan name
claims
ColumnTypeDescription
claim_idPKINTUnique claim identifier
member_idINTReferenced member identifier
provider_idINTReferenced provider identifier
service_dateDATEDate of claim service
claim_statusVARCHAR(30)Claim processing status
providers
ColumnTypeDescription
provider_idPKINTUnique provider identifier
provider_nameVARCHAR(120)Provider name
regionVARCHAR(50)Provider operating region
Tablesmembersclaimsproviders
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results