How to Find the Nth Highest Salary Efficiently. WORST SQL Query Ever? #coding #sql

preview_player
Показать описание
Learn the worst SQL query to find the Nth highest salary, and how to avoid it! This video reveals the most inefficient way to write this query, and provides tips on how to optimize your code for better performance.

-------------------------------------------------------------------------
►►►Social Media – Where I sort of Live
-------------------------------------------------------------------------
►►►Books I refer to
-------------------------------------------------------------------------
►►►Camera Gears
► Video Gears That We Use For Creating Our YouTube Video

► Work From Home Essential Tech That We Use Daily

AFFILIATE DISCLOSURE:
#RebellionRider
Рекомендации по теме
Комментарии
Автор

Check out How to Find the Nth Highest Salary in Oracle: 5 Easy Methods

Rebellionrider
Автор

By using Dense_rank we can write simple Query:select ename, sal from (select ename, sal, dense_rank() over(order by sal desc)
rnk from emp) where rnk=2;

GnanendraY-zp
visit shbcf.ru