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
Rank Common Support Issues by Practice
00:00
5 left

Rank Common Support Issues by Practice

MediumSQL · PostgreSQL

Problem

You are given support ticket data from athenahealth practices using athenaOne. Write a PostgreSQL query that returns the most common customer issues for each practice, ranked by ticket volume. Only include tickets created in January 2024 with a status other than closed. If two issue types have the same ticket count within a practice, they should receive the same rank. Return the practice name, issue category, ticket count, and rank, ordered by practice and rank.

Schema

practices
ColumnTypeDescription
practice_idPKINTUnique identifier for a medical practice
practice_nameVARCHAR(100)Display name of the practice
regionVARCHAR(50)Geographic region for the practice
issue_categories
ColumnTypeDescription
category_idPKINTUnique identifier for an issue category
category_nameVARCHAR(100)Issue category label
severityVARCHAR(20)Default severity associated with the issue category
support_tickets
ColumnTypeDescription
ticket_idPKINTUnique support ticket identifier
practice_idINTPractice that submitted the ticket
category_idINTIssue category associated with the ticket
created_atDATEDate the ticket was created
statusVARCHAR(20)Current workflow status of the ticket
Tablespracticesissue_categoriessupport_tickets
Interviewer

Your question is Rank Common Support Issues by Practice. 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.