PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates proficiency in temporal data manipulation and aggregation, covering SQL date-range joins, window functions for per-user ranking, and Python frequency counting of senders and receivers, and it falls under the Data Manipulation (SQL/Python) domain for data scientist roles.

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

Identify Transactions During 'Golden' Membership Period

Company: Robinhood

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

transaction +-----------+---------+------------+---------+ | trans_id | user_id | trans_date | amount | +-----------+---------+------------+---------+ | 1 | 101 | 2023-01-05 | 200.00 | | 2 | 102 | 2023-01-07 | 150.50 | | 3 | 101 | 2023-02-03 | 75.00 | | 4 | 103 | 2023-02-10 | 50.00 | +-----------+---------+------------+---------+ ​ membership +---------+---------+------------+------------+ | user_id | tier | start_date | end_date | +---------+---------+------------+------------+ | 101 | golden | 2022-12-15 | NULL | | 102 | silver | 2023-01-01 | 2023-02-01 | | 103 | golden | 2023-02-01 | 2023-03-01 | | 104 | golden | 2023-01-20 | NULL | +---------+---------+------------+------------+ ##### Scenario Robinhood interview for an Analytics-Engineer/DS role: product database has transaction and membership tables plus a log of P2P messages. ##### Question SQL: Return every transaction that took place while the user’s membership tier was ‘golden’. end_date is NULL for still-active subscriptions. SQL follow-up: Using a window function (ROW_NUMBER or RANK), pick the first transaction made by each user during any ‘golden’ subscription period. Python: Given a list/DF of messages with sender_id and receiver_id, output the five users who sent the most messages and the five who received the most. ##### Hints Think joins on date ranges, COALESCE(end_date, CURRENT_DATE), window partition by user, Counter/collections for frequency tally.

Quick Answer: This question evaluates proficiency in temporal data manipulation and aggregation, covering SQL date-range joins, window functions for per-user ranking, and Python frequency counting of senders and receivers, and it falls under the Data Manipulation (SQL/Python) domain for data scientist roles.

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 to localize trading drop contributors - Robinhood (Medium)
  • Write SQL and Python for transaction analytics - Robinhood (Medium)
  • List Transactions During Active 'Gold' Membership Period - Robinhood (Medium)
  • Identify Top Users with Declined Transactions in SQL - Robinhood (Medium)
  • Create OHLC Aggregates from Tick Data in Python - Robinhood (Medium)