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 Cross-System Operational Metrics
00:00
5 left

SQL for Cross-System Operational Metrics

MediumSQL · PostgreSQL

Problem

Write a SQL query to analyze operational performance across multiple systems by joining tables for users, activities, and outcomes, then aggregating results by team and month.

Use the supplied tables and include activities without outcomes. Treat a missing user team as Unassigned and calculate success rate among activities with recorded outcomes.

Output

  1. One row per team and calendar month, with team, activity_month, distinct_systems, total_activities, activities_with_outcomes, successful_outcomes, success_rate_pct, avg_resolution_hours, and success_rate_change_pct_points.
  2. Include months containing activities even when no outcome exists. Sort by team, then month.

Schema

users
ColumnTypeDescription
user_idPKINTUnique user identifier
full_nameVARCHAR(100)User's display name
teamVARCHAR(50)Operational team assigned to the user
activities
ColumnTypeDescription
activity_idPKINTUnique activity identifier
user_idINTUser who performed the activity
system_nameVARCHAR(50)System that recorded the activity
activity_atTIMESTAMPTimestamp when the activity occurred
outcomes
ColumnTypeDescription
outcome_idPKINTUnique outcome identifier
activity_idINTActivity associated with the outcome
statusVARCHAR(30)Outcome status
outcome_atTIMESTAMPTimestamp when the outcome was recorded
Tablesusersactivitiesoutcomes
Interviewer

Your question is SQL for Cross-System Operational Metrics. 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.