Customers Who Bought All Products | Leetcode 1045 | Crack SQL Interviews in 50 Qs #mysql #leetcode

preview_player
Показать описание
Want to crack SQL interviews? Check out our latest video!!!

A 50-questions SQL study plan to ace any interview.
This tutorial will walk you through the solution in easy steps. This is an easy-level question from Leetcode.

Consistency is what transforms average into excellence.
So be consistent & keep Coding💻!!

Timecodes
0:00 - Introduction
0:32 - Question Explanation
1:21 - Understanding Concept with the help of Example
2:36 - Writing SQL Query
3:58 - Explanation of SQL Query
4:57 - Outro

Connect With Me -

#coding
#leetcode
#mysql
#sql
#interview
#sqlinterview
#sqlinterviewquestionsandanswers
#sql_server
#learnwithchirag
#customer
#products
#all
Рекомендации по теме
Комментарии
Автор

Hey there! 👋 For more interesting content, tutorials, and updates, Feel free to connect with me on

Instagram Handles :-



Let's stay connected and keep the creativity flowing! 💡

learnwithchirag
Автор

select c.customer_id
from Customer as c
join Product as p
group by customer_id
having count( distinct c.product_key)=count( distinct p.product_key)

using joins

ranitmandal
Автор

Nice and better solution than using 'where' and subqueries on this problem!

nimbu_
Автор

Here we are equating count(distinct product_key) = (
SELECT count(product_key)
from Product
)
but suppose a customer buy product key 5 and 7 still its count is 2 but product keys given in product table are 5 and 6
So according to question he has not buy all the items??

anonymous_hecklar
Автор

can you please make video on pandas 30 days leetcode QUESTION

aishwaryaarya
visit shbcf.ru