stratascratch
  • Interview Questions
    • Interview Loops
    • Analytical
    • Algorithm
    • ML Coding
    • Stats Coding
    • Visualization
    • Concept
  • Data Labs
    • Discover
    • Your Notebooks
  • Mock Interview
  • Learn
  • Blog
  • Pricing
  • About
Log in
  • Interview Questions

    • Interview Loops
    • Analytical
    • Algorithm
    • ML Coding
    • Stats Coding
    • Visualization
    • Concept
  • Data Labs

    • Discover
    • Your Notebooks
  • Mock Interview
  • Learn
  • Blog
  • Pricing
  • About
Log inSign up
Back to Mini Analyses
  1. Assignment
  2. Your Solution
  3. Solution
  4. Solutions from Users
  5. Discussion

Each User's Third Transaction

You must be logged in to download the datasets

Uber: Find every user's third transaction in time order.

Assignment

You're an analyst on the rider engagement team at Uber. The team is studying early user behavior, and one milestone they track is a user's third transaction — it's the point where occasional riders tend to become regulars. The latest transaction export covers May 2026.

Deliverables

  • For every user, their third transaction in time order: the transaction id, when it happened, and the amount.
  • A clear statement of how you handled users for whom a third transaction can't be determined, and why.
  • A short closing report of your findings for the rider engagement team, including anything they should double-check before relying on the numbers.

Data Description

uber_user_transactions.csv has one row per transaction:

  • transaction_id
  • user_id
  • transaction_timestamp - when the transaction happened
  • spend_amount - amount spent
  • status - transaction status

Practicalities

You can solve this in Python, SQL, or a mix of both — StrataScratch notebooks support both languages in the same notebook.

Assume this data comes directly from the payments system and hasn't been cleaned, so review it carefully before relying on the numbers. When something looks off, work out what it is and decide how to handle it; when a definition or a final decision is genuinely ambiguous, choose a reasonable option and explain why. There's often more than one valid way to compute a result, so explain the approach you take and the reasoning behind your choices.

What's assessed: your results, and how clearly you explain what you see in the data and justify the choices you make.

This question is part of an interview loop

See the full interview round by round, with questions for each stage.

Uber · Data AnalystMarketplaces, gig & delivery · Analytics EngineerMarketplaces, gig & delivery · Data EngineerMarketplaces, gig & delivery · Financial Analyst