In this video we are going to discuss a hard leet code problem called human traffic of stadium. We will be using SQL analytical functions to solve the problem. Do comment if you have a better solution.
Zero to hero(Advance) SQL Aggregation:
https://youtu.be/5Ighj_2PGV0
Most Asked Join Based Interview Question:
https://youtu.be/xR87ctOgpAE
Solving 4 Trick SQL problems:
https://youtu.be/Ck1gQrlS5pQ
Data Analyst Spotify Case Study:
https://youtu.be/-YdAIMjHZrM
Top 10 SQL interview Questions:
https://youtu.be/Iv9qBz-cyVA
Interview Question based on FULL OUTER JOIN:
https://youtu.be/KQfWd6V3IB8
Playlist to master SQL :
https://youtube.com/playlist?list=PLBTZqjSKn0IeKBQDjLmzisazhqQy4iGkb
Rank, Dense_Rank and Row_Number:
https://youtu.be/xMWEVFC4FOk
script:
create table stadium (
id int,
visit_date date,
no_of_people int
);
insert into stadium
values (1,'2017-07-01',10)
,(2,'2017-07-02',109)
,(3,'2017-07-03',150)
,(4,'2017-07-04',99)
,(5,'2017-07-05',145)
,(6,'2017-07-06',1455)
,(7,'2017-07-07',199)
,(8,'2017-07-08',188);
#sql #dataengineer #leetcode