LeetCode Medium 1988 'Find Cutoff Score for Each School' 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
Рекомендации по теме
Комментарии
Автор

thank you for the video, here is another way using window functions, pls review and let me know your thoughts, thanks
select distinct s.school_id
, ifnull(FIRST_VALUE(e.score)
over (partition by s.school_id
order by e.student_count desc, e.score asc)
, -1) as score
from Schools s
left outer join Exam e on (e.student_count <= s.capacity)

saisushanthdurvasulabitsian
welcome to shbcf.ru