AnalystPath

User's Third Transaction

SQLMediumMid levelUber~15 min

Problem

**[Asked at Uber]**

Uber wants to understand purchasing behaviour. For every user who has made at least
3 transactions, retrieve the **exact details of their 3rd transaction** (ordered by
transaction date, earliest first).

Return `user_id`, `amount`, and `transaction_date`.

Tables

Example rows — the live problem includes the full dataset.

payments
payment_iduser_idamounttransaction_date

Expected output

Your answer should return 3 rows with the columns user_id, amount, transaction_date.

Starter code (SQL)

SELECT *
FROM payments;

Solve this SQL question free

Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.

Solution & explanation

Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.

Sign up free to unlock

Related SQL questions