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
Window Functions for Recurring Failures
00:00
5 left

Window Functions for Recurring Failures

MediumSQL · PostgreSQL

Problem

Jio operations teams need to identify recurring failures across JioFiber, JioAirFiber, and other Jio service surfaces. Write a PostgreSQL query using a CTE and a window function to find failure patterns that occurred at least twice during January 2026.

Requirements

  1. Join operational logs to the Jio service catalog.
  2. Consider only rows with status = 'FAILED' and timestamps from 2026-01-01 through 2026-01-31.
  3. Use ROW_NUMBER() to sequence failures within each product, surface, failure code, and region.
  4. Return only recurring patterns, including the failure count, first occurrence, and latest occurrence. Sort by failure count descending, then product and failure code.

Schema

jio_operational_logs
ColumnTypeDescription
log_idPKINTUnique operational log identifier
service_idINTReferences the Jio service catalog
surfaceVARCHAR(80)Operational surface where the event occurred
failure_codeVARCHAR(50)Failure classification code
occurred_atTIMESTAMPTimestamp when the event occurred
statusVARCHAR(20)Operational event status
regionVARCHAR(50)Geographic operating region
jio_service_catalog
ColumnTypeDescription
service_idPKINTUnique Jio service identifier
product_nameVARCHAR(80)Jio product or platform name
owner_teamVARCHAR(80)Team responsible for the service
Tablesjio_operational_logsjio_service_catalog
Interviewer

Your question is Window Functions for Recurring Failures. Start with the requirements and the two 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.