The Wise Analyst
The Wise Analyst
  • 5
  • 17 989
Top 3 Ways to find nth Highest Salary & Correlated Subquery Explained
In this video, I have covered the Top 3 ways to find nth Highest Salary which is a very commonly asked question in Job Interviews and Campus Placement Tests. This video also features the concept of Correlated Subqueries and their applications in the easiest way possible.
We have covered the following 3 ways to find the nth highest salary in this video:
1. Using Dense_Rank() Window Function
2. Using Top and Distinct Keywords
3. Using Correlated Subquery
Window Functions Part 1 Video Link: ua-cam.com/video/pK-t9dKk4DE/v-deo.html
Window Functions Part 2 Video Link: ua-cam.com/video/luQaR3Qm-KA/v-deo.html
*Create Table and Insert Script for Tables used in the Video*:
Please find the SQL Scripts for the EMPLOYEE Table in my GitHub Repository as provided (Use these scripts to Create the tables and insert dummy data into them):
github.com/saharsh95/SQL_Challenges_And_Concepts.git
Thank you for Watching.
Please Like and Share this video with your friends and family.
For more such training content and videos, kindly Subscribe to my channel "Stellar Smart Academy".
Cheers :) :)
Created and Managed By:
Saharsh Bhatnagar
(Founder of Stellar Smart Academy)
Переглядів: 11 303

Відео

Window Functions-Part 1(Basics of Windowing,OVER() Clause,Partition By Clause)
Переглядів 3,8 тис.4 роки тому
This video (Window Functions - Part 1) explains everything you need to know about the Basics of Window Functions in SQL and the associated concepts of OVER() Clause and Partition By Clauses. We have covered the following topics in this video (Part 1): 1. Drawbacks of GROUP BY clause and Basic Aggregate Functions 2. What is a Window Function? 3. Introduction to OVER() Clause 4.Use of PARTITION B...
Window Functions-Part 2 (ROW_NUMBER(), RANK(), DENSE_RANK() in SQL)
Переглядів 1,6 тис.4 роки тому
This video (Window Functions - Part 2) explains everything you need to know about the Ranking Based Window Functions (such as ROW_NUMBER() Function, RANK() Function and DENSE_RANK() Function) in SQL and the associated concepts of ORDER BY Clause used inside the OVER() Clause. Please note that this video is in continuation to Window Functions Part 1 which covers the Basics of Window Functions in...
Curious Case of NULLS (All you need to know about NULLS in SQL)!!
Переглядів 4524 роки тому
This video explains everything you need to know about NULLS in SQL and the associated concepts of using Nulls in SQL Server Management Studio. We have covered the following topics: 1. Difference between NULL,‘NULL’ and an empty string (‘’). 2. Are two Nulls equal to each other (is Null=Null)? Using the SQL ANSI_NULLS property. 3. NULLS behavior with Joins versus INTERSECT. 4.Null Related Functi...
JOINS in SQL Made Easy (Step by Step Tutorial with Algorithm Walkthrough)!!
Переглядів 8174 роки тому
This video provides a step by step walkthrough on the different types of joins in SQL for Beginner level audience and how to better understand the joins using predefined algorithms for each type (Inner Join, Left Outer Join, Right Outer Join, Full Outer Join, Cross Join). It includes the explanation of each Join algorithm using theory followed by a hands-on practical of implementing each algori...

КОМЕНТАРІ

  • @matz.sjodin
    @matz.sjodin Рік тому

    Thank you for this overhaul of Window functions. I think Im finally getting it !!!

  • @mshivanand20
    @mshivanand20 Рік тому

    informative in all the vedio, You have stopped the posting furter vidios !!

  • @venugopal3758
    @venugopal3758 Рік тому

    The way you explained is awesome sir.

  • @jose3scoto
    @jose3scoto Рік тому

    Thanks for the clear explanation. May I ask how do you know this much? I mean your approach to learn and understand. Is it just by reading and practicing? If so, what are some books you recommend. Thanks in advance!

  • @hintsoftware
    @hintsoftware Рік тому

    Can we use where clause or any kind of filters in any way for each windows function seperately ? We are unable to fully utilize window function without where clauses... or any trick to do so in sql server ?

  • @ashutoshpatil2637
    @ashutoshpatil2637 Рік тому

    Perfect explanation 👍

  • @MangaMania24
    @MangaMania24 Рік тому

    Thank you, this was super helpful for someone like me who found sql overwhelming in the beginning

  • @Sonuyadav-um9fj
    @Sonuyadav-um9fj Рік тому

    wow....excellent explaination bro

  • @zeeshanaziz3512
    @zeeshanaziz3512 Рік тому

    Best explanation of joins.

  • @ajitsomwanshi2320
    @ajitsomwanshi2320 Рік тому

    Teaching style is amazing sir

  • @GauravSharma-xp5gf
    @GauravSharma-xp5gf Рік тому

    Pls explain why we take inner query is great than outer query

  • @haniyassin1875
    @haniyassin1875 Рік тому

    I'm a big fan thank you for clear explanation . ... you deserve to subscribe

  • @vivekananda263
    @vivekananda263 2 роки тому

    Like way of explaining

  • @sachinnegi4630
    @sachinnegi4630 2 роки тому

    very well explained, found very less results on you tube on windows functions with such brief explanation for every function.

  • @i010792
    @i010792 2 роки тому

    Wow!!!! I've been scouring the internet looking for something just like this! So very well done and explained!!!

  • @Learn_by_fun0
    @Learn_by_fun0 2 роки тому

    Please explain in Hindi so that others can easily understand who has low knowledge about in English bt intrested to learn something

  • @GAURAVGUPTA-zu2bu
    @GAURAVGUPTA-zu2bu 2 роки тому

    Great video bhai

  • @bree3733
    @bree3733 2 роки тому

    Excellent video and easy explanation! Thank you!

  • @ganeshsarade9108
    @ganeshsarade9108 2 роки тому

    You are superb bro please continue SQL series ❤️👌

    • @thewiseanalyst95
      @thewiseanalyst95 2 роки тому

      Thank you so much for you appreciation Ganesh..Sure I will plan on making more such content..Cheers!

  • @ujjwalgupta8725
    @ujjwalgupta8725 2 роки тому

    This is the best explanation of nth highest salary topic I have got till now on youtube.

    • @thewiseanalyst95
      @thewiseanalyst95 2 роки тому

      Thank you so much Ujjwal..Please share and promote my videos as it motivates me to create more such content for you and related audience.

  • @sachindixit6170
    @sachindixit6170 2 роки тому

    I appreciate your knowledge & efforts you put in this video. You are master please upload more videos.

    • @thewiseanalyst95
      @thewiseanalyst95 2 роки тому

      Thank you so much Sachin..I will surely make more such content for you and my audience. Cheers!

  • @tvramana3038
    @tvramana3038 3 роки тому

    Wow... superb explanation...

    • @thewiseanalyst95
      @thewiseanalyst95 3 роки тому

      Glad you liked it! Please Share it with your friends and colleagues so that I can make more such videos for you all.

  • @parmbirsingh4603
    @parmbirsingh4603 3 роки тому

    This was an informative video. Helped me understand somethings I learned from other Channels. I'm trying to figure out how to get the Nth highest salary Dept wise of an employee. So the output should have every 2nd highest salary of an employee in a Department.

  • @searez7251
    @searez7251 3 роки тому

    Your explanation is clear, concise and to the point. Your voice is soft, and your presentation is impressive, as someone has said in the comment section, I don't know why this video didn't get a lot of views (maybe UA-cam algorithm?) please continue making content, you have a gift of teaching. Last but not least in the second method(using top and distinct key words) i used the same syntax as yours (select min (salary) from (select distinct top 3 salary from employee order by salary desc ) but instead of returning '50000' the message was'Incorrect syntax near ')' . what could be the possible mistake? I am using sql server. I will really appreciate your help.

    • @thewiseanalyst95
      @thewiseanalyst95 3 роки тому

      Thank you so much for your kind words and encouragement. As for your issue, it seems to be a parsing error possibly due to missing parentheses. I would recommend pasting your SQL Query in Notepad++ using SQL as Language and it will help you in finding the missing parentheses.

  • @biswajeetrath9434
    @biswajeetrath9434 3 роки тому

    Nice explanation please cover subquery

    • @thewiseanalyst95
      @thewiseanalyst95 3 роки тому

      Thank you Biswajeet Rath..I will surely try to provide a video for subquery shortly.

  • @learnlife8055
    @learnlife8055 3 роки тому

    SIMPLY EXCELLENT; VIDEO MORE

    • @thewiseanalyst95
      @thewiseanalyst95 3 роки тому

      Thanks you so much. I will come up with more such videos soon.

  • @vishalghanghav748
    @vishalghanghav748 3 роки тому

    Your explanation was just onpoint and too good.Dont know how it has so less views

    • @thewiseanalyst95
      @thewiseanalyst95 3 роки тому

      Thank you so much. I strive to make the content as easy to absorb as possible. Please share my channel videos with your friends and I will try to make more of such content. 😊😄

  • @umeshwar7648
    @umeshwar7648 3 роки тому

    Your explanation is very easy to understand . Keep up the good work brother !

    • @thewiseanalyst95
      @thewiseanalyst95 3 роки тому

      Thanks a lot for your feedback.. Such comments fuel my channel.. Cheers

  • @chetanlanje6144
    @chetanlanje6144 4 роки тому

    thanks bro for giving crystal clear details....

  • @MayankSharma-cp6yu
    @MayankSharma-cp6yu 4 роки тому

    It would be more clear if you keep a picture of table A and table B in top of the video while explaining the results of any joins/query. Otherwise nice content, thank you for these videos.

    • @thewiseanalyst95
      @thewiseanalyst95 3 роки тому

      Great Suggestion Mayank. I will incorporate this tip in my upcoming videos. Thank you for your feedback and support.

  • @directioner76
    @directioner76 4 роки тому

    Thanks for the video :)

  • @shaurabhdas1463
    @shaurabhdas1463 4 роки тому

    Very good content and explanation

  • @paribhat
    @paribhat 4 роки тому

    Very insightful and clear content

  • @rajkumarbhatnagar8136
    @rajkumarbhatnagar8136 4 роки тому

    Informative content,lucidly explained in a ready to comprehend step by step manner... All the best ahead in this endeavor .

  • @directioner76
    @directioner76 4 роки тому

    Amazing video! Keep making more 💯💪

  • @paribhat
    @paribhat 4 роки тому

    Good informative video. Thank you for the content