LeetCode 534: Game Play Analysis III [SQL]

  Рет қаралды 5,517

Frederik Müller

Frederik Müller

Күн бұрын

Пікірлер: 15
@UmaAndLak
@UmaAndLak 2 жыл бұрын
Loved to see how the window function simplified the query here! Thank you for helping us understand this better.
@frederikmuller
@frederikmuller 2 жыл бұрын
Thanks for leaving so many comments!
@whiterabbit9428
@whiterabbit9428 2 жыл бұрын
Thanks for your excellent explanation!
@nukagvilia4141
@nukagvilia4141 2 жыл бұрын
Thanks for a great video! Could you explain which solution would be better in terms of time complexity? Which is faster, window functions or self joins?
@HenggaoCai
@HenggaoCai 3 жыл бұрын
Well said!
@rishianand4892
@rishianand4892 3 жыл бұрын
select player_id,event_date, (select sum(games_played) from activity a2 where a2.player_id=a1.player_id and a2.event_date
@parveshkiran7217
@parveshkiran7217 3 жыл бұрын
while giving explanation just try to give in a manner that its easy to understand..ur explanation is good but ur way of explanation is like speaking to urself
@frederikmuller
@frederikmuller 3 жыл бұрын
thanks for the constructive feedback, I'll try incorporating that into my future videos!
@rahulpoptani90
@rahulpoptani90 2 жыл бұрын
@@frederikmuller You are doing great! No need to change anything!
@johnhhu2137
@johnhhu2137 3 жыл бұрын
So the code actually works like python code, running row by row
@rishianand4892
@rishianand4892 3 жыл бұрын
Will below query work: select player_id,MAX(event_date) AS event_date,sum(games_played) as games_played_so_far from activity a1 where (player_id,event_date) in (select player_id,event_date from activity a2 where a2.player_id=a1.player_id and a2.event_date
@ruthraramanan3407
@ruthraramanan3407 3 жыл бұрын
*alarm went off*🤣🤣🤣
@ujjwalshrivastava3594
@ujjwalshrivastava3594 2 жыл бұрын
if u can put table schema it will really be good
@johnhhu2137
@johnhhu2137 3 жыл бұрын
Here is my code on Datagrip, just not understand very well on: SUM(b.games_played) a.event_data=b.event_date GROUP BY a.player_id,a.device_id,a.event_date;
@ruthraramanan3407
@ruthraramanan3407 3 жыл бұрын
it's just the main table(in ur case b) date should be less than the iterating table(a). that's why a.event_date>=b.event_date. Else the way Fred did is vice versa. Hope u understand.
LeetCode 550: Game Play Analysis IV [SQL]
8:31
Frederik Müller
Рет қаралды 9 М.
LeetCode 1454: Active Users [SQL]
14:01
Frederik Müller
Рет қаралды 6 М.
Cool Parenting Gadget Against Mosquitos! 🦟👶 #gen
00:21
TheSoul Music Family
Рет қаралды 34 МЛН
ПРЯМОЙ ЭФИР. Золотой мяч France Football 2024
4:41:06
MAGIC TIME ​⁠@Whoispelagheya
00:28
MasomkaMagic
Рет қаралды 36 МЛН
LeetCode 197: Rising Temperature [SQL]
8:20
Frederik Müller
Рет қаралды 19 М.
LeetCode 1661: Average Time of Process per Machine [SQL]
8:16
Frederik Müller
Рет қаралды 10 М.
LeetCode 1270: All People Report to the Given Manager [SQL]
10:09
Frederik Müller
Рет қаралды 4,5 М.
LeetCode 262: Trips and Users [SQL]
9:28
Frederik Müller
Рет қаралды 9 М.
What does a Data Analyst actually do? (in 2024) Q&A
14:27
Tim Joo
Рет қаралды 74 М.
LeetCode 181: Employees Earning More Than Their Managers [SQL]
8:28
Frederik Müller
Рет қаралды 14 М.
Game Play Analysis III - Leetcode | Week 1 | QS 3
4:57
The Big Data Show
Рет қаралды 699
Encode and Decode TinyURL - Leetcode 535 - Python
9:02
NeetCode
Рет қаралды 18 М.
LeetCode 626: Exchange Seats [SQL]
7:58
Frederik Müller
Рет қаралды 9 М.
Cool Parenting Gadget Against Mosquitos! 🦟👶 #gen
00:21
TheSoul Music Family
Рет қаралды 34 МЛН