LeetCode 183: Customers Who Never Order [SQL]

  Рет қаралды 12,629

Frederik Müller

Frederik Müller

Күн бұрын

Пікірлер: 12
@frederikmuller
@frederikmuller 2 жыл бұрын
If you want to have access to more free SQL problems, check out StrataScratch: stratascratch.com/?via=frederik
@julyw1291
@julyw1291 3 жыл бұрын
I like the second way, pretty straightforward and easy to understand.
@mickyman753
@mickyman753 2 жыл бұрын
can you make a pattern sheet like , for similar pattern questions we can use this or that , like for this ques , pattern can be when we want first table elements not present in second then , doing left join make result table's 2nd table col null and can filter on null ,when we want to compare same column elements then self join is way to go........pattern like these would really help as when we lose touch to sql they can help us strike the inutition more
@frederikmuller
@frederikmuller 2 жыл бұрын
interesting idea
@pimaniye41
@pimaniye41 2 жыл бұрын
subquery method is far more useful in my opinion. thank you for the video. liked 👍
@debashish_dutta
@debashish_dutta 2 жыл бұрын
3rd Approach: Using NOT EXISTS select name as "Customers" from customers cus where not exists (select 1 from orders ord where cus.id = ord.customerId)
@pritishpattnaik4674
@pritishpattnaik4674 Жыл бұрын
ya got it , I was missing that AS part so getting wrong answer
@sandeepmanjunath8004
@sandeepmanjunath8004 Жыл бұрын
select name as customer from customers as c where not exists (select customer_id from orders as o where o.customer_id = c.id) ;
@balaji27venkatesh
@balaji27venkatesh Ай бұрын
-- efficient code select c.name as "Customers" from Customers as c left join Orders as o on c.id = o.customerId where o.id is null ---- simple to understand but not efficient code select name as "Customers" from Customers where id not in (select distinct Customerid from Orders)
@frederikmuller
@frederikmuller Ай бұрын
I see you’re solving a lot of questions on this channel, keep it up.
@xt8382
@xt8382 3 жыл бұрын
Thanks!
@mohit4812
@mohit4812 2 жыл бұрын
best
LeetCode 196: Delete Duplicate Emails [SQL]
5:12
Frederik Müller
Рет қаралды 19 М.
LeetCode 577: Employee Bonus [SQL]
11:16
Frederik Müller
Рет қаралды 3,6 М.
Какой я клей? | CLEX #shorts
0:59
CLEX
Рет қаралды 1,9 МЛН
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
LeetCode 182: Duplicate Emails [3 Solutions]
11:49
Frederik Müller
Рет қаралды 10 М.
LeetCode 626: Exchange Seats [SQL]
7:58
Frederik Müller
Рет қаралды 10 М.
Database Indexing for Dumb Developers
15:59
Laith Academy
Рет қаралды 82 М.
SQL for Data Analytics - Learn SQL in 4 Hours
4:08:41
Luke Barousse
Рет қаралды 572 М.
LeetCode 1454: Active Users [SQL]
14:01
Frederik Müller
Рет қаралды 6 М.
Какой я клей? | CLEX #shorts
0:59
CLEX
Рет қаралды 1,9 МЛН