PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates temporal interval reasoning, set-based querying and aggregation skills, focusing on identifying and counting overlapping time intervals using SQL or equivalent Python data-manipulation tools.

  • Medium
  • PayPal
  • Data Manipulation (SQL/Python)
  • Data Scientist

Identify Session with Maximum Overlapping Sessions Count

Company: PayPal

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

sessions | session_id | start_time | end_time | | 1 | 2023-01-01 09:00:00 | 2023-01-01 10:00:00 | | 2 | 2023-01-01 09:30:00 | 2023-01-01 11:00:00 | | 3 | 2023-01-01 10:30:00 | 2023-01-01 12:00:00 | | 4 | 2023-01-01 13:00:00 | 2023-01-01 14:00:00 | ##### Scenario SQL screen – session overlap analysis ##### Question Given the sessions table, write SQL to return the session_id that overlaps with the greatest number of other sessions and the overlap count. ##### Hints Self-join on intervals where start_a < end_b AND end_a > start_b; aggregate and order by count desc.

Quick Answer: This question evaluates temporal interval reasoning, set-based querying and aggregation skills, focusing on identifying and counting overlapping time intervals using SQL or equivalent Python data-manipulation tools.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.

Related Coding Questions

  • Write SQL using HAVING and window functions - PayPal (easy)
  • Write SQL for top drivers and cancellation rates - PayPal (easy)
  • Compute top orders and cancellation rate - PayPal (easy)
  • Write SQL to flag Venmo ATO - PayPal (Medium)
  • Write conditional aggregation SQL queries - PayPal (Medium)