MEDIUMVerified Real Interview• Data Analyst
User's Third Transaction
Verified Source:Uber Data Analytics Interview
Uber wants to study customer habits on their platform. Specifically, they want to examine the third transaction of every user who has made at least 3 transactions.
Write a query to obtain the:
user_idspendtransaction_date
for each user's third transaction.
Sort the output by user_id ascending.
Table:
transactions(user_idINT,spendDECIMAL,transaction_dateTIMESTAMP)
Execution Sandbox:
Your query executes inside an isolated in-memory PostgreSQL engine (PGlite WebAssembly). You have full access to standard PostgreSQL aggregations, window functions, and CTEs.
Standard SQL (ANSI)|Ln 1, Col 1(7 lines, 104 chars)
Tab Indent⌘↵ Run Query
Ready to execute. Press Run (⌘+Enter)
Write your query and click “Run” or press ⌘+Enter to inspect output.