Leetcode MEDIUM 2986 - Find Third Transaction RANK() WINDOW - Explained by Everyday Data Science

  Рет қаралды 816

Everyday Data Science

Everyday Data Science

Күн бұрын

Пікірлер: 2
@abhijeetjain8228
@abhijeetjain8228 Ай бұрын
WITH cte1 AS ( SELECT *, RANK() OVER(PARTITION BY user_id ORDER BY transaction_date) AS rw, LAG(spend, 1) OVER(PARTITION BY user_id ORDER BY transaction_date) AS lag1, LAG(spend, 2) OVER(PARTITION BY user_id ORDER BY transaction_date) AS lag2 FROM Transaction ) SELECT user_id, transaction_date, spend, lag1, lag2 FROM cte1 WHERE rw = 3 AND spend > lag1 AND spend > lag2;
@santoshingle3977
@santoshingle3977 Ай бұрын
Can you please provide data for all the test cases in your videos.
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 556 М.
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12
Cute
00:16
Oyuncak Avı
Рет қаралды 12 МЛН
How to Solve ANY LeetCode Problem (Step-by-Step)
12:37
Codebagel
Рет қаралды 237 М.
Airflow for Beginners: Build Amazon books ETL Job in 10 mins
13:13
Sunjana in Data
Рет қаралды 6 М.
From 2.6 GPA to $200K Microsoft Software Engineer
17:21
Sundas Khalid
Рет қаралды 38 М.
What does a Data Analyst actually do? (in 2024) Q&A
14:27
Tim Joo
Рет қаралды 63 М.
What Is the Fastest Way To Do a Bulk Insert? Let’s Find Out
15:04
Milan Jovanović
Рет қаралды 11 М.