HARD Leetcode SQL Problem Solved (#262)

preview_player
Показать описание

This Leetcode problem, #262, is rated as Hard on Leetcode's list of problems.

In this video, you'll learn what the problem is about, what we need to answer with our query, and the step-by-step process to follow to get to an accepted answer.

You'll learn different approaches to getting different parts of the query as well.

⏱ TIMESTAMPS:
00:00 - Question
01:23 - Expected results
02:56 - Group the data
03:47 - Cancelled trips
06:55 - Cancellation rate
08:04 - Banned users
10:31 - Banner users option 2
Рекомендации по теме
Комментарии
Автор

This channel is really a hidden gem. Keep up the good work 💪

omarmandri
Автор

I think we can get away with one join to the users table?
JOIN users u ON u.user_id in (t.client_id, t.driver_id) AND u.banned = 'No'

I didn't test it, so forgive me if I got it wrong.
Great channel by the way, Subscribed

ahmad-murery
join shbcf.ru