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 Operational Reporting
00:00
5 left

SQL for Operational Reporting

MediumSQL · PostgreSQL

Problem

Write a SQL query to track monthly operational volumes, exception rates, and approval turnaround time by branch and product line at East West Bank.

Use the provided operational case, branch, and product line data. Treat the submitted timestamp as the reporting month, calculate exception rate as a percentage of total cases, and calculate average approval turnaround in hours for cases with an approval timestamp.

Output

  1. One row per month, branch, and product line with operational activity.
  2. Columns: month, branch_name, product_line_name, operational_volume, exception_rate_pct, and avg_approval_hours.
  3. Sort by month, branch name, and product line name ascending.

Schema

branches
ColumnTypeDescription
branch_codePKVARCHAR(10)Unique East West Bank branch code
branch_nameVARCHAR(100)Branch display name
regionVARCHAR(50)Geographic branch region
product_lines
ColumnTypeDescription
product_line_codePKVARCHAR(10)Unique product line code
product_line_nameVARCHAR(100)Product line display name
operational_cases
ColumnTypeDescription
case_idPKINTUnique operational case identifier
branch_codeVARCHAR(10)Branch handling the case
product_line_codeVARCHAR(10)Product line associated with the case
submitted_atTIMESTAMPCase submission timestamp
approved_atTIMESTAMPApproval timestamp, if approved
exception_flagBOOLEANWhether the case entered an exception workflow
Tablesoperational_casesbranchesproduct_lines
Interviewer

Your question is SQL for Operational Reporting. 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.