filmov
tv
Leetcode Hard SQL Problem - 6 | Second Most Recent Activity | SQL Window Analytical Functions

Показать описание
In this video we will silve a leetcode hard problem 1369 . Where we need to find second most recent activity and if user has only 1 activoty then return that as it is. We will use SQL window functions to solve this problem.
Here is the script:
create table UserActivity
(
username varchar(20) ,
activity varchar(20),
startDate Date ,
endDate Date
);
insert into UserActivity values
('Alice','Travel','2020-02-12','2020-02-20')
,('Alice','Dancing','2020-02-21','2020-02-23')
,('Alice','Travel','2020-02-24','2020-02-28')
,('Bob','Travel','2020-02-11','2020-02-18');
#sql #interview #window #functions #rank #count
Here is the script:
create table UserActivity
(
username varchar(20) ,
activity varchar(20),
startDate Date ,
endDate Date
);
insert into UserActivity values
('Alice','Travel','2020-02-12','2020-02-20')
,('Alice','Dancing','2020-02-21','2020-02-23')
,('Alice','Travel','2020-02-24','2020-02-28')
,('Bob','Travel','2020-02-11','2020-02-18');
#sql #interview #window #functions #rank #count
LEETCODE - Passenger Bus Problem - SQL Interview Query 23| SQL Problem Level 'HARD'
HARD Leetcode SQL Problem Solved (#262)
Leetcode Hard SQL Problem | Human Traffic of Stadium
LeetCode 262 - Trips and Users - Hard SQL Interview
Leetcode Hard Problem | Complex SQL 7 | Trips and Users
Stop solving 500+ Leetcode problems
LeetCode Hard 1369 'Second Most Recent Activity' Microsoft Interview SQL Question with Exp...
Solving the most complex SQL Problem on LeetCode | SQL Interview Question and Answer
LeetCode 1097: Game Play Analysis V (Hard) [SQL]
Solving an SQL Interview Problem
how the PROS solve leetcode and technical interview problems!
Total Sales Amount by Year | 1384 | Hard SQL Leetcode Problem | SQL Interview
Leetcode-1412 Hard SQL Problem | Find the Quiet Students in All Exams | Data Analytics
4 Leetcode Mistakes
Leetcode Hard SQL Problem - 6 | Second Most Recent Activity | SQL Window Analytical Functions
Hard Leetcode Problem 1225 | SQL | Interview Question | With Explanation
Leetcode Hard SQL Problem | Human Traffic of Stadium #sqlqueries #dataanalytics
262. Trips and Users | Leetcode SQL Hard
#1 Leetcode Hard SQL Problem | Cab bookings And Cancellation Rate | #dataanalystinterviewquestion
How to EASILY solve LeetCode problems
MLV Prasad - LeetCode SQL [ HARD] | 0185 | 'Department Top Three Salaries' |
601. Human Traffic of Stadium | Leetcode SQL Hard
LeetCode Hard SQL problem | Students Reports By Geography | Pivot Ka Baap
Leetcode Interviews
Комментарии