Find Nth Highest Salary in SQL | 5 Different Ways | Most Important SQL Interview Question
ฝัง
- เผยแพร่เมื่อ 8 ส.ค. 2021
- 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
Join our Telegram Channel - t.me/joingroupCodeEra
⭐Part 1:Top 9 SQL queries for interview -
• Top 9 SQL queries for ...
⭐Part 2:Top 9 SQL queries for interview -
• PART 2 : Top 9 SQL que...
⭐Top SQL Interview Question
• Top SQL Interview Ques...
⭐Types of Joins in SQL-
• SQL Joins & Its Types ...
⭐Aggregate Functions In SQL | COUNT, SUM, AVG, MIN, MAX | IFNULL( )
• Aggregate Functions In...
⭐Difference Between DELETE, DROP and TRUNCATE
• Difference Between DEL...
⭐SQL vs NoSQL | MySQL vs MongoDB
• Difference between SQL...
⭐DBMS vs RDMS
• DBMS vs RDBMS | What i...
⭐Normalization in DBMS-
• Normalization and its ...
⭐Types of key in DBMS-
• Types of Keys in DBMS ...
⭐Create MySQL Database and Table -
• How to Create Database...
#mysql #oracle #dbms #query #top #sqlserver #database #PlacementPreparation - วิทยาศาสตร์และเทคโนโลยี
The best video out there on this topic, must watch before the interviews
Easy, Simple and best way of example, Thanks 👍
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.
Now my doubt has been cleared, thank you
finally my doubt cleared in simple way very thanks hope you upload this kind of videos which are helpful
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.
Amazing explanation of all the techniques. Thank you!! 😊👍🏻
Thank you so much 🙏for this well explained session. 🙌
You helped me in clearing my interview 🤠 Thank you so much
Congratulations.we are so happy that our video helped you.
Kitne ki package lagi bhaiya😮
Very useful vedio Thanks a lot
Excellent Explanation
Excellent job ma'am 👏 👍 👌 🙌
Thanks 🙏 🙏 🙏
Can you plzz tell .. Is there any approach which is used to find nth salary using MAX function
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?
thank you. God bless
Informative ❤️
Nice. , good video
Thank You so much Mam
Why use N-1 expression is used? How did you come to that expression? Is it as we doing a binary search?
thanks please bring videos on python basic problems
If we use LIMIT function in oracle sql developer it shows error as sql command not properly ended. What to do for that?
Good one
Awesome 😊
when we use limit function in oracle it throws error.
Thanks Ma'am
u r brilliant
Thanks
Is this will be work in SSMS?
Great video 🙏🏻
Thank you so much😊
Hii.. Can you find Nth rank in Department wise please
thank you mam, you taught very well
Please Share with your friends.
@@CodeEra2020 sure
Using Limit and Dense Rank is the Correct Approach to get the nth highest numeric value
Thanks for watching..
Thanks for the info
Welcome.
Please clear in limit if we have multiple rows then.
very helpful!!!!!!!!!!
Thank you so much.
Good explanation
Thank you so much
nice explaination
Keep watching
Nice 👍
Thank you so much
Superb
Thank you so much😊
Good
Thank you
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
Please watch this video th-cam.com/video/2QCUQhihwDM/w-d-xo.html . here you will find alternate options for Limit clause
you can use top instead of limit in sql server
We can use exist and not exist
2:51,, you query is not working
Upload more👍
Pls upload more cases
Could you please mention which cases do you want to see?
limit do not work in Oracle what is the option
?
You can use TOP in Oracle
When I use limit and top get error sql command not properly ended.How I fix it
Does limit function work in MS SQL server platform?
Nope
No..you can use TOP instead of limit in ms sql
Select salary
From employee_info E1
Where 3=
(Select count(distinct salary)
From employee_info e2
Where e2.salary >= e1.salary)
Limit function not work in my sql
NO
It is working fine in MYSQL
@@CodeEra2020 not working in sql server?
LIMIT NOT WORK