Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
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 feedbackSuccess 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 Time Overlap Analysis
00:00
5 left

SQL Time Overlap Analysis

MediumSQL · PostgreSQL

Problem

Analyze how many minutes where a single interview room had two or more interviewers at once using start_time and end_time.

Assume each row represents one interviewer scheduled in a room. Treat intervals as half-open, so an interviewer ending exactly when another begins does not create overlap. Include rooms with no overlapping time and ignore rows with missing or invalid timestamps.

Output

  1. One row per room with valid or recorded scheduling data.
  2. Columns: room_name, overlapping_minutes.
  3. Report total minutes during which at least two interviewers were present, ordered by room_name ascending.

Schema

interview_sessions
ColumnTypeDescription
session_idPKINTUnique identifier for the scheduled interviewer session
room_nameVARCHAR(100)Interview room identifier
interviewer_nameVARCHAR(150)Name of the interviewer assigned to the session
start_timeTIMESTAMPScheduled session start time
end_timeTIMESTAMPScheduled session end time
Tablesinterview_sessions
Interviewer

Your question is SQL Time Overlap Analysis. Start with the requirements and the one table 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.