LeetCode Medium 570 'Managers with 5 Direct Reports' Amazon Interview SQL Question With Explanation

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

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
Рекомендации по теме
Комментарии
Автор

with cte as
(select managerid from employee
group by managerid
having count(id)>=5)

select name from employee as e
join cte as c on c.managerid = e.id

WanderWarick
Автор

select m.name from employee as e inner join employee as m on e.managerid = m.id group by e.managerid having count (e.id) >=5

gunjanpatil
Автор

with cte as(select managerId, count(1) as direct_reports
from Employee
group by managerId
having count(1)>=5
)

select E.name
from Employee E inner join cte C
on C.managerId=E.id;

chiragshetty
Автор

select m.name from employee as e
inner join employee as m on e.managerid = m.id
group by e.managerid
having count(e.id) >=5;

Lucifer-wdgh
join shbcf.ru