Find Nth Highest Salary in SQL | 5 Different Ways | Most Important SQL Interview Question

preview_player
Показать описание
In this video we will see how we can find the Nth (1st, 2nd , 3rd, ... ,nth) Highest salary in SQL . Here we will discuss five different ways to solve this query .

✅Using Max() - 1:15
✅Using LIMIT - 3:15
✅Without using LIMIT - 5:42
✅Using dense_rank() - 8:27
✅Using NOT IN operator - 11:10

⭐Part 1:Top 9 SQL queries for interview -

⭐Part 2:Top 9 SQL queries for interview -

⭐Top SQL Interview Question

⭐Types of Joins in SQL-

⭐Aggregate Functions In SQL | COUNT, SUM, AVG, MIN, MAX | IFNULL( )

⭐Difference Between DELETE, DROP and TRUNCATE

⭐SQL vs NoSQL | MySQL vs MongoDB

⭐DBMS vs RDMS

⭐Normalization in DBMS-

⭐Types of key in DBMS-

⭐Create MySQL Database and Table -

#mysql #oracle #dbms #query #top #sqlserver #database #PlacementPreparation
Рекомендации по теме
Комментарии
Автор

You helped me in clearing my interview 🤠 Thank you so much

UtkarshSinhas
Автор

The best video out there on this topic, must watch before the interviews

saadanwar
Автор

Easy, Simple and best way of example, Thanks 👍

imamhasan
Автор

But in Oracle SQL if we use ROWNUM instead of Limit then the order by clause needs to be in a inner query. Otherwise it throws an error.

souvikghosh
Автор

finally my doubt cleared in simple way very thanks hope you upload this kind of videos which are helpful

lflgyge
Автор

Now my doubt has been cleared, thank you

bobsva
Автор

Amazing explanation of all the techniques. Thank you!! 😊👍🏻

dehumanizer
Автор

Using Limit and Dense Rank is the Correct Approach to get the nth highest numeric value

satyabhau
Автор

Awesome tutorial, concise and crystal clear. Well done! At the end, I would go for the one that works all the time, preferably the one that fecthes all the records that meet the specified condition/restriction.

osoriomatucurane
Автор

Excellent job ma'am 👏 👍 👌 🙌
Thanks 🙏 🙏 🙏

RupeshYadav-ktdv
Автор

Thank you so much 🙏for this well explained session. 🙌

sunilachaarya
Автор

As 2nd highest is 3lakh and has two employees same salary using normal max function only one row it return the output or two row?

shameenabanu
Автор

After watching this video clear the concept Thank you.../@@##

singingclub
Автор

Why use N-1 expression is used? How did you come to that expression? Is it as we doing a binary search?

ishatawade
Автор

thanks please bring videos on python basic problems

rohitbhosale
Автор

Can you plzz tell .. Is there any approach which is used to find nth salary using MAX function

gagandeep
Автор

limit clause not working in sql server and without limit clause you solved that i didnt understand can you explain in more so that i can understand i watched many time this video but not clear concept, ,,....thanks in advance CodeEra

DileepKumar-kcqj
Автор

If we use LIMIT function in oracle sql developer it shows error as sql command not properly ended. What to do for that?

pradnyavelapurkar