AMAZON LeetCode Medium 1613 “Find the Missing IDs' Interview SQL Question Explanation | EDS

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

SQL Schema:

Create table If Not Exists Customers (customer_id int, customer_name varchar(20))
Truncate table Customers
insert into Customers (customer_id, customer_name) values ('1', 'Alice')
insert into Customers (customer_id, customer_name) values ('4', 'Bob')
insert into Customers (customer_id, customer_name) values ('5', 'Charlie')

In this video I solve and explain a medium difficulty leetcode SQL question using MySQL query. This question has been asked in Apple, Facebook, Amazon, Google, Adobe, Microsoft, Adobe interviews or what we popularly call FAANG interviews.
I explain the related concept as well. This question includes points to keep in mind to develop SQL queries.

LeetCode is the best platform to help you enhance your skills, expand your knowledge and prepare for technical interviews.

If you found this helpful, Like and Subscribe to the channel for more content.

#LeetCodeSQL #FAANG #SQLinterviewQuestions
Рекомендации по теме
Комментарии
Автор

I'm not able to use aggregate function max with recursive cte .

kavyatripathi
Автор

bro, thanks a lot.
Please try to add schemas in your all previous leetcode videos, so that we can practice on mysql workbench. Since Leetcode premium is costly, we used to practice in SQL developer/ MySQL workbench.

souradeep.official
Автор

WITH bounds AS (
SELECT MIN(customer_id) AS min_id, MAX(customer_id) AS max_id
FROM customers
),
series AS (
SELECT generate_series(min_id, max_id) AS customer_id
FROM bounds
)
SELECT Series.customer_id as ids FROM series
left join customers on
where customer_name is null

electroluxsweden
join shbcf.ru