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

  Рет қаралды 97,462

CodeEra

CodeEra

2 жыл бұрын

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

Пікірлер: 72
@saadanwar7914
@saadanwar7914 Жыл бұрын
The best video out there on this topic, must watch before the interviews
@imamhasan9942
@imamhasan9942 7 ай бұрын
Easy, Simple and best way of example, Thanks 👍
@osoriomatucurane9511
@osoriomatucurane9511 6 ай бұрын
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.
@user-lf6lg5yg7e
@user-lf6lg5yg7e Ай бұрын
finally my doubt cleared in simple way very thanks hope you upload this kind of videos which are helpful
@bobsva98
@bobsva98 Жыл бұрын
Now my doubt has been cleared, thank you
@dehumanizer668
@dehumanizer668 2 жыл бұрын
Amazing explanation of all the techniques. Thank you!! 😊👍🏻
@sunilachaarya6678
@sunilachaarya6678 5 ай бұрын
Thank you so much 🙏for this well explained session. 🙌
@UtkarshSinhas
@UtkarshSinhas 2 жыл бұрын
You helped me in clearing my interview 🤠 Thank you so much
@CodeEra2020
@CodeEra2020 2 жыл бұрын
Congratulations.we are so happy that our video helped you.
@Cake-bz5bf
@Cake-bz5bf Жыл бұрын
Kitne ki package lagi bhaiya😮
@Wundex
@Wundex Жыл бұрын
thank you. God bless
@RaviTejaMeruva
@RaviTejaMeruva 13 күн бұрын
Excellent Explanation
@RupeshYadav-kt5dv
@RupeshYadav-kt5dv 2 ай бұрын
Excellent job ma'am 👏 👍 👌 🙌 Thanks 🙏 🙏 🙏
@mohansaivelagapudi929
@mohansaivelagapudi929 2 жыл бұрын
Very useful vedio Thanks a lot
@souvikghosh7872
@souvikghosh7872 2 жыл бұрын
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.
@rajdeepsinghborana2409
@rajdeepsinghborana2409 2 жыл бұрын
Informative ❤️
@poojam271
@poojam271 20 күн бұрын
Thank You so much Mam
@radhasakhi4546
@radhasakhi4546 2 жыл бұрын
Nice. , good video
@gagandeep8710
@gagandeep8710 Жыл бұрын
Can you plzz tell .. Is there any approach which is used to find nth salary using MAX function
@shraddhadhakad1154
@shraddhadhakad1154 Жыл бұрын
Awesome 😊
@shameenabanu2433
@shameenabanu2433 2 жыл бұрын
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?
@sandeeptripurana4496
@sandeeptripurana4496 10 күн бұрын
Good one
@rohitbhosale4614
@rohitbhosale4614 Жыл бұрын
thanks please bring videos on python basic problems
@zulminanahmed9489
@zulminanahmed9489 4 ай бұрын
Thanks Ma'am
@pradnyavelapurkar9905
@pradnyavelapurkar9905 7 ай бұрын
If we use LIMIT function in oracle sql developer it shows error as sql command not properly ended. What to do for that?
@shreyasawankar7601
@shreyasawankar7601 Жыл бұрын
Great video 🙏🏻
@CodeEra2020
@CodeEra2020 Жыл бұрын
Thank you so much😊
@nakulanand2725
@nakulanand2725 2 жыл бұрын
Thanks for the info
@CodeEra2020
@CodeEra2020 2 жыл бұрын
Welcome.
@AmitGupta-fd3zy
@AmitGupta-fd3zy Жыл бұрын
thank you mam, you taught very well
@CodeEra2020
@CodeEra2020 Жыл бұрын
Please Share with your friends.
@AmitGupta-fd3zy
@AmitGupta-fd3zy Жыл бұрын
@@CodeEra2020 sure
@ishatawade
@ishatawade 2 жыл бұрын
Why use N-1 expression is used? How did you come to that expression? Is it as we doing a binary search?
@vdharman1272
@vdharman1272 Жыл бұрын
Thanks
@satyabhau69
@satyabhau69 2 жыл бұрын
Using Limit and Dense Rank is the Correct Approach to get the nth highest numeric value
@CodeEra2020
@CodeEra2020 2 жыл бұрын
Thanks for watching..
@prajakta_subramanian9909
@prajakta_subramanian9909 6 ай бұрын
u r brilliant
@ankitac4994
@ankitac4994 2 жыл бұрын
very helpful!!!!!!!!!!
@CodeEra2020
@CodeEra2020 2 жыл бұрын
Thank you so much.
@khushbooparashar2556
@khushbooparashar2556 2 жыл бұрын
Good explanation
@CodeEra2020
@CodeEra2020 2 жыл бұрын
Thank you so much
@govindkota1026
@govindkota1026 Жыл бұрын
when we use limit function in oracle it throws error.
@palakmahajan9999
@palakmahajan9999 2 жыл бұрын
Nice 👍
@CodeEra2020
@CodeEra2020 2 жыл бұрын
Thank you so much
@jaymahajan3871
@jaymahajan3871 2 жыл бұрын
Good
@CodeEra2020
@CodeEra2020 2 жыл бұрын
Thank you
@MacTechcom
@MacTechcom 2 жыл бұрын
nice explaination
@CodeEra2020
@CodeEra2020 2 жыл бұрын
Keep watching
@joelesthak2551
@joelesthak2551 Жыл бұрын
Superb
@CodeEra2020
@CodeEra2020 Жыл бұрын
Thank you so much😊
@ArifKhan-qo9jw
@ArifKhan-qo9jw Жыл бұрын
Is this will be work in SSMS?
@AshiiStories
@AshiiStories 2 жыл бұрын
Hii.. Can you find Nth rank in Department wise please
@arunsinghrajpoot5363
@arunsinghrajpoot5363 Жыл бұрын
Please clear in limit if we have multiple rows then.
@DileepKumar-kc4qj
@DileepKumar-kc4qj Жыл бұрын
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
@CodeEra2020
@CodeEra2020 Жыл бұрын
Please watch this video kzfaq.info/get/bejne/aLdziLSZzs7bdIE.html . here you will find alternate options for Limit clause
@unknown_fact1586
@unknown_fact1586 8 ай бұрын
you can use top instead of limit in sql server
@chetansati5406
@chetansati5406 2 жыл бұрын
Pls upload more cases
@CodeEra2020
@CodeEra2020 2 жыл бұрын
Could you please mention which cases do you want to see?
@husainasaifee4969
@husainasaifee4969 2 жыл бұрын
Upload more👍
@manishranjan571
@manishranjan571 2 жыл бұрын
2:51,, you query is not working
@harshithaharshi1175
@harshithaharshi1175 2 жыл бұрын
We can use exist and not exist
@pawan8154
@pawan8154 2 жыл бұрын
limit do not work in Oracle what is the option ?
@CodeEra2020
@CodeEra2020 2 жыл бұрын
You can use TOP in Oracle
@himanshumaggu6562
@himanshumaggu6562 2 жыл бұрын
When I use limit and top get error sql command not properly ended.How I fix it
@wasimmomin3851
@wasimmomin3851 2 жыл бұрын
Does limit function work in MS SQL server platform?
@SurendraYadav_
@SurendraYadav_ 2 жыл бұрын
Nope
@ankurdixit89
@ankurdixit89 2 жыл бұрын
No..you can use TOP instead of limit in ms sql
@nawabigaming5301
@nawabigaming5301 2 жыл бұрын
Limit function not work in my sql
@CodeEra2020
@CodeEra2020 2 жыл бұрын
NO It is working fine in MYSQL
@user-yy1dw5bc8y
@user-yy1dw5bc8y Жыл бұрын
@@CodeEra2020 not working in sql server?
@bibhukalyanpatra3525
@bibhukalyanpatra3525 2 жыл бұрын
LIMIT NOT WORK
SQL Interview Question - Find Nth Highest Salary | LeetCode
30:40
Sumit Mittal
Рет қаралды 37 М.
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 78 МЛН
Incredible magic 🤯✨
00:53
America's Got Talent
Рет қаралды 78 МЛН
The 25 SQL Questions You MUST Know for Data Analyst Interviews
32:47
KSR Datavizon
Рет қаралды 199 М.
SQL "difference between" interview questions (part 1)
8:20
Crack Concepts
Рет қаралды 609 М.
Solving SQL Interview Queries | Tricky SQL Interview Queries
37:22
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 2 МЛН
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 38 МЛН
Samsung Galaxy Unpacked July 2024: Official Replay
1:8:53
Samsung
Рет қаралды 23 МЛН
😱Хакер взломал зашифрованный ноутбук.
0:54
Последний Оплот Безопасности
Рет қаралды 769 М.
OZON РАЗБИЛИ 3 КОМПЬЮТЕРА
0:57
Кинг Комп Shorts
Рет қаралды 1,8 МЛН