Leetcode MEDIUM 3058 - Friends With No Mutual Friends - SELF JOINS in SQL | Everyday Data Science

  Рет қаралды 342

Everyday Data Science

Everyday Data Science

Күн бұрын

Пікірлер: 2
@xiamojq621
@xiamojq621 Ай бұрын
Please can you upload end to end ML videos that's what we are waiting for?
@nischalsubedi9432
@nischalsubedi9432 Ай бұрын
This solution is way too complicated with multiple joins which I do not think is that intuitive. Here is a simple query that can get to the same answer: WITH friends_count AS ( SELECT user_id1, COUNT(*) as no_of_friends FROM Friends GROUP BY user_id1 ) SELECT f.user_id1, f.user_id2 FROM Friends f JOIN friends_count fc ON f.user_id1 = fc.user_id1 WHERE fc.no_of_friends = 1;
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
What is ETL | What is Data Warehouse | OLTP vs OLAP
8:07
codebasics
Рет қаралды 435 М.
SQL Solutions for the Real World
12:02
Knowledge Hub in Analytics
Рет қаралды 37
Best of CES 2025
14:50
The Verge
Рет қаралды 243 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН