PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates a data scientist's competency in SQL-based sequence detection, temporal filtering, and aggregation to identify repeated navigation patterns within user-day sessions.

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

Identify Users with Specific Page Navigation Patterns

Company: PayPal

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

page_visits +------------+---------+---------+---------------------+ | visit_date | user_id | page_id | ts | +------------+---------+---------+---------------------+ | 2023-10-01 | 101 | A | 2023-10-01 08:00:05 | | 2023-10-01 | 101 | B | 2023-10-01 08:05:05 | | 2023-10-01 | 101 | D | 2023-10-01 08:15:05 | | 2023-10-01 | 102 | A | 2023-10-01 09:00:00 | | 2023-10-01 | 102 | C | 2023-10-01 09:10:00 | +------------+---------+---------+---------------------+ ##### Scenario Web-analytics team wants to understand specific navigation behavior on the site. ##### Question Write SQL that returns user_id(s) who, within the same calendar day, visited page 'A' and later page 'B' at least once, never visited page 'C' that day, and completed the A→B sequence more than once. ##### Hints Use window functions (lead/lag or ROW_NUMBER) partitioned by user_id and visit_date, then aggregate.

Quick Answer: This question evaluates a data scientist's competency in SQL-based sequence detection, temporal filtering, and aggregation to identify repeated navigation patterns within user-day sessions.

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)