Solving the most complex SQL Problem on LeetCode | SQL Interview Question and Answer

  Рет қаралды 16,470

techTFQ

techTFQ

Күн бұрын

Пікірлер: 42
@kyleebrahim8061
@kyleebrahim8061 3 ай бұрын
This guy is a SQL genius
@vanshagrawal6896
@vanshagrawal6896 3 ай бұрын
instead of l1.user_id < l2.user_id we can write l1.user_id !=l2.user_id so that we do not have to union the table at the end
@derek713
@derek713 Ай бұрын
I don't think this works, this method means you will have to union friendship table within the "where clause" ......... where (u1.user_id,u2.user_id) not in (select user1_id,user2_id from friendship union select user2_id,user1_id from friendship) group by u1.user_id, u2.user_id, u1.day,u2.day having count(*)>=3 )
@hassamulhaq7762
@hassamulhaq7762 3 ай бұрын
because of previous sql videos I easily understand thelogic he used to write queries in this video. really thanks for such educational video.
@maradanaajaykumar3657
@maradanaajaykumar3657 3 ай бұрын
Please do more leet code problems bro it helps us to understand complex problems
@anonymousgreen5080
@anonymousgreen5080 3 ай бұрын
Sir leetcode sql premium questions are difficult. Would appreciate few more videos on this topic.
@shafaligarg1796
@shafaligarg1796 3 ай бұрын
He's crazy talented man 🤯 kudos
@jirikalina1890
@jirikalina1890 3 ай бұрын
You should definitely do another. Very good content Sir.
@vikaskumar-oj2fr
@vikaskumar-oj2fr 3 ай бұрын
Your database skills are great 👍
@GarvitaSaraswat-t9r
@GarvitaSaraswat-t9r 3 ай бұрын
looking forward to more such videos! thanks in advance!
@deepakdas4513
@deepakdas4513 18 күн бұрын
crystal clear explanation 👍
@sujaa1000
@sujaa1000 3 ай бұрын
Thank you very much! very very helpful. Look forward to more such problems.
@iamdushyanta
@iamdushyanta 3 ай бұрын
Could you please do more leet code problems?
@RRR5670
@RRR5670 3 ай бұрын
sir please come up with a series❤
@mainsocial1105
@mainsocial1105 2 ай бұрын
Really enjoyed this video!! Thanks :)
@roz_world
@roz_world 3 ай бұрын
@techtfq sir please leetcode SQL problem solution series please
@FabioAlmeida-k6t
@FabioAlmeida-k6t 3 ай бұрын
well illustrated and explained
@saadmultani7251
@saadmultani7251 3 ай бұрын
Please do more leetcode complex problem
@lio-s4n7
@lio-s4n7 3 ай бұрын
Nice. Be posting leetcode solutions for sql.
@mohansai9109
@mohansai9109 3 ай бұрын
Please do more leet code problems
@rohit_vora
@rohit_vora 3 ай бұрын
hello everyone , i am having a tiny problem while writing query , if anyone could help me that would be so great. so, when i write query and press enter to go to next line, it automaticaly add some space at the begining which i don't want for ex: (select * from abc where aaa group by bbb) somthin like this. if anyone knows what settings should i chaneg to write just like sir writing in the video, i would be so greatfull to you.
@adesholaolaitan2257
@adesholaolaitan2257 3 ай бұрын
Please which tool are you using to record your screen?
@bestquotes2765
@bestquotes2765 3 ай бұрын
It's a good approach, but have one doubt do we need the valid_user cte?. Because we are anyway filtering it using having in a freinds cte.
@sunetala2957
@sunetala2957 2 ай бұрын
How to FCFS for insert or update in code sql😢
@JoelJeremiah-v5t
@JoelJeremiah-v5t 3 ай бұрын
For what roles are such questions asked in the interview, sir?
@Naveenvuppala
@Naveenvuppala 3 ай бұрын
When you understand the logic and know the cte logic it's like playing game
@MohdSaeed-g6l
@MohdSaeed-g6l 3 ай бұрын
Sir, I am clicking this question then require subscribe to unlock. Can you suggest me how it will open.
@marrapumani
@marrapumani 3 ай бұрын
sir try to make videos on transactions and cursors
@shadeditz181
@shadeditz181 3 ай бұрын
sir do you have any paid course of sql
@Malaika_ki_rahein
@Malaika_ki_rahein 3 ай бұрын
sir please teach transaction management with real world exampless
@arunsam6830
@arunsam6830 3 ай бұрын
Can any one suggest a playlists for Terraform for IAC?
@rajeshmajumdar4999
@rajeshmajumdar4999 3 ай бұрын
Champion !!!
@Mr.nikk62
@Mr.nikk62 3 ай бұрын
Hii sir thanku for this quality video but sir i have a big question to solve in SQL sir there any way to connect with you and tell you the problem and other student also learn form the question Kindly provide me the way to connect with you
@Malaika_ki_rahein
@Malaika_ki_rahein 3 ай бұрын
please teach us by reference of KORTH BOOK
@haleylearn
@haleylearn 2 ай бұрын
Here my solution WITH cte AS ( SELECT l1.user_id AS user_id1, l2.user_id AS user_id2, COUNT(l2.user_id) AS cnt FROM listens l1 JOIN listens l2 ON l1.user_id l2.user_id AND l1.song_id = l2.song_id AND l1.day = l2.day GROUP BY l1.user_id, l2.user_id HAVING COUNT(l2.user_id) >= 3 ) , cte_concat_listen AS ( SELECT *, CASE WHEN user_id1 < user_id2 THEN CONCAT(user_id1, user_id2) ELSE CONCAT(user_id2, user_id1) END AS concat_userid FROM cte ) -- Result SELECT user_id1 AS user_id, user_id2 AS recommended_id FROM cte_concat_listen WHERE concat_userid NOT IN (SELECT CONCAT(user1_id, user2_id) AS concat_friend FROM friendship) ORDER BY user_id1;
Complete guide to Database Normalization in SQL
40:51
techTFQ
Рет қаралды 203 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
Coding Interviews Be Like
5:31
Nicholas T.
Рет қаралды 6 МЛН
SQL Case Study - Bike Rental Shop | Practice SQL Queries
37:35
Leetcode Daily | 2 Jan 2025
31:05
Code With Senan
Рет қаралды 1
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН