Uber SQL Interview Question | Find User's third transaction | SQL Window Functions | Advanced SQL
Nishtha Nagar Nishtha Nagar
2.98K subscribers
2,708 views
100

 Published On Aug 6, 2024

Learn how to find a user's third transaction using SQL window functions. This video breaks down the problem step-by-step, providing a clear and concise solution. Master advanced SQL techniques and impress your interviewers!

Script -
CREATE TABLE transactions (
user_id INT,
spend DECIMAL(10,2),
transaction_date DATETIME
);

INSERT INTO transactions (user_id, spend, transaction_date)
VALUES
(111, 100.50, '2022-01-08 12:00:00'),
(111, 55, '2022-01-10 12:00:00'),
(121, 36, '2022-01-18 12:00:00'),
(145, 24.99, '2022-01-26 12:00:00'),
(111, 89.60, '2022-02-05 12:00:00');

TIMESTAMP
00:00 Problem Description and Approach
04:15 Solution Implementation on MySQL Workbench

#sql #dataanalysts #dataengineer

show more

Share/Embed