01 SQL Query To Find Nth Highest Salary | SQL Interview Question and answers

  Рет қаралды 4,742

Learning with Rohan

2 жыл бұрын

In this video I will show you how to write :
SQL Query To Find Nth Highest Salary
Top 3 highest salary in SQL
SQL Interview Question and answers
Download the SQL scripts: github.com/rohanbs1/sql
SQL Query To Find Nth Highest Salary, Nth highest salary in SQL, nth highest salary in Oracle, nth highest salary, nth highest salary in SQL with explanation, nth highest salary using correlated subquery
I have created a series of videos on SQL Interview questions and answers.
I will be covering various topics as listed below:
sql interview questions and answers,
Interview Q&A on SQL,
sql interview questions,
sql interview,
sql interview questions and answers for freshers,
sql queries interview questions and answers,
sql interview questions and answers for experienced,
oracle,sql server,mysql,
interview questions and answers,
interview questions,
interview questions and answers for a job
find nth highest salary in sql,
how to find nth highest salary,
nth highest salary in mysql,
nth highest salary using correlated subquery,
sql interview amazon
It's going to be beneficial for both freshers and experienced with various level (whether you are 3,5,7,10 years of exp)
If you are new to my channel, please go ahead and subscribe so you dont miss my informational videos. I will be arranging videos in my playlist. Stay tuned
Keep learning and sharing knowledge. All the best!
#sql #sqlinterview #sqlqueries #sqlhandson #sqlinterviewquestions #sqlserver #mysqlinterview #mysql #oracleinterview #database #interviewquestionsandanswers
If you are new or havent subscribed yet, please go ahead and subscribe so that you dont miss informational videos.
Subscribe to our channel for more videos: kzbin.info/door/wmsNEQQ_d5gbu2sRFtm5oA
Watch more videos: kzbin.info/door/wmsNEQQ_d5gbu2sRFtm5oAvideos
Learn via Playlist: kzbin.info/door/wmsNEQQ_d5gbu2sRFtm5oAplaylists

Пікірлер: 13
@snowguo1786
@snowguo1786 2 жыл бұрын
This explain very well on the question using 4 approaches: groupby, row_number, rank, and CTE. Will watch again to review. Thank you!
@pankajbhagwatkar6720
@pankajbhagwatkar6720 2 жыл бұрын
Thank you sir for keenly elaborating all those functions and synopsis of queries.... 😇
@LearningwithRohan
@LearningwithRohan 2 жыл бұрын
You’re welcome.. keep learning and growing
@durgaprasadt7162
@durgaprasadt7162 2 жыл бұрын
Nice video sir, thank you 💐🙏
@LearningwithRohan
@LearningwithRohan 2 жыл бұрын
You are welcome
@vru5696
@vru5696 2 жыл бұрын
Can you help in the below questions. 1. Sales(Table) Sale(Column) 10 20 30 -5 -25 Output Profit Loss 60 30 2.Input A 456 467 B 478 478 Output A 456 B 467 b 478 3. Product(Table) id, Name, Product 10,abc,Shirt 20,bcd,Jeans 30,Jkl,Cap 40,Lmn,Shirt 10,abc,Jeans 20,bcd,Shirt Write a query to find out customers who bought both jeans and Shirt?
@LearningwithRohan
@LearningwithRohan 2 жыл бұрын
Sure will do shortly
@LearningwithRohan
@LearningwithRohan 2 жыл бұрын
I mean tomorrow
@LearningwithRohan
@LearningwithRohan 2 жыл бұрын
Here is the SQL for first question with sale as ( select 10 sales union select 20 sales union select 30 sales union select -5 sales union select -25 sales ) select sum(case when sales > 0 then sales else 0 end) profit, sum(case when sales < 0 then sales else 0 end) loss from sale
@LearningwithRohan
@LearningwithRohan 2 жыл бұрын
with cte as ( select 10 id,'abc' as cust_name,'Shirt' as product union select 20 id,'bcd' as cust_name,'Jeans' as product union select 30 id,'Jkl' as cust_name,'Cap' as product union select 40 id,'Lmn' as cust_name,'Shirt' as product union select 10 id,'abc' as cust_name,'Jeans' as product union select 20 id,'bcd' as cust_name,'Shirt' as product ) select id, cust_name , 'Purchased both' sales--, count(product) from cte where product in ('Shirt','Jeans') group by id, cust_name having count(product)>1
@LearningwithRohan
@LearningwithRohan 2 жыл бұрын
Here is the SQL for 2nd one with cte as ( select 'A' names, 456 as value1, 467 as value2 union select 'B' names, 478 as value1, 478 as value2 ) select names, value1 from cte union select names, value2 from cte
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 17 МЛН
Pleased the disabled person! #shorts
00:43
Dimon Markov
Рет қаралды 27 МЛН
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 37 МЛН
Женская драка в Кызылорде
00:53
AIRAN
Рет қаралды 494 М.
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 17 МЛН