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
Summarize Operations Issues by Source
00:00
5 left

Summarize Operations Issues by Source

MediumSQL · PostgreSQL

Problem

Acme Manufacturing tracks operational issues by source system. Write a PostgreSQL query to summarize issue volume and resolution speed for sources that currently have at least one open issue.

Requirements

  1. Return one row per source_name.
  2. Show the count of open issues as open_issue_count.
  3. Show the count of open high-severity issues as high_open_issue_count.
  4. Show the average number of days to resolve closed issues as avg_resolution_days, rounded to 1 decimal place.
  5. Include only sources with at least one open issue.
  6. Order results by open_issue_count descending, then source_name ascending.

Schema

issues
ColumnTypeDescription
issue_idPKINTPrimary key for each issue
source_idINTForeign key to the issue source
severityVARCHAR(20)Severity label such as low, medium, or high
statusVARCHAR(20)Issue status such as open or closed
created_atDATEDate the issue was created
resolved_atDATEDate the issue was resolved, if closed
issue_sources
ColumnTypeDescription
source_idPKINTPrimary key for the issue source
source_nameVARCHAR(50)Human-readable source name
daily_activity
ColumnTypeDescription
activity_idPKINTPrimary key for the activity row
issue_idINTForeign key to the issue
activity_dateDATEDate of the activity
minutes_spentINTMinutes spent on the issue that day
Tablesissuesissue_sourcesdaily_activity
Interviewer

Your question is Summarize Operations Issues by Source. 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.