LeetCode Medium 1459 'Rectangles Area' Twitter 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
Рекомендации по теме
Комментарии
Автор

what if i do not use CTE? below solution is also accepted:
select p1.id as p1, p2.id as p2, abs(p1.x_value - p2.x_value) * abs(p1.y_value - p2.y_value) as area
from Points p1
cross join Points p2
#on p1.id = p2.id # no on clause in cross join
having area != 0 and p1< p2
order by area desc, p1, p2

roymou