Тёмный

Part 3: SQL Query Interview Questions & Answers | How to find 1st, 2nd & Nth Highest Salary | 3 Ways 

SDET- QA
Подписаться 730 тыс.
Просмотров 73 тыс.
50% 1

SQL Query Interview Questions & Answers
Topics:
1) How to find 1st, 2nd & Nth Highest Salary | 3 Ways
2) How to find 1st, 2nd & Nth Highest Salary | 3 Different Ways (max(), limit & top )
Display the highest salary
Display the 2nd highest
Display the Nth highest salary
#########################
Udemy Courses:
#########################
Manual Testing+Agile with Jira Tool
****************************
► shorturl.at/xNXZ4
Selenium with Java+Cucumber
********************************
► shorturl.at/aIKMW
Selenium with Python & PyTest
*************************
► shorturl.at/ELW09
Selenium with python using Robot framework
*****************************
► shorturl.at/bcDPZ
API Testing(Postman, RestAssured & SoapUI)
*******************************
► shorturl.at/uAWY7
Web & API Automation using Cypress with Javascript
***************************
► rb.gy/4uum2n
Playwright with Javascript
**************************
► shorturl.at/gALZ1
Jmeter-Performance Testing
************************
► rb.gy/ocj7r2
SDET Essencials(Full Stack QA)
*************************
► rb.gy/hlnf2v
Appium-Mobile Automation Testing
*************************
► rb.gy/wmzv64
Java Collections
*****************
► bit.ly/3S66ezE
Python Programming
*********************
► urlis.net/gdsf...
Cucumber BDD Framework
***************************
► bit.ly/3F7d69r
Protractor with Javascript
***************************
► urlis.net/4udd...
####################################
RU-vid Playlists:
####################################
Manual Testing & Agile
***********************
► bit.ly/3ujvaYa
► bit.ly/3OYzxQj
SQL
****
► bit.ly/3R6XjeG
► bit.ly/3nE0a1s
► bit.ly/3IeKuuJ
linux & Shell Scripting
**********************
► bit.ly/3up1Z6a
► bit.ly/3nzvGxx
Java
*****
► bit.ly/3R9QfOs
► bit.ly/3AoRMKM
► bit.ly/3IbTTDn
► bit.ly/3ybXInv
► bit.ly/3yCoHdw
Selenium With Java+Cucumber
********************************
► bit.ly/3P2FMm4
► bit.ly/3yhiIt4
► bit.ly/3uokzet
► bit.ly/3a7XIND
► bit.ly/3umN2S9
► bit.ly/3aar7GW
► bit.ly/3y9kD2S
► bit.ly/3uhLskn
Python
*******
► bit.ly/3agNgU0
► bit.ly/3NJNnoy
► bit.ly/2CTQ4mR
► bit.ly/3OIYWh1
Selenium With Python,Pytest&Behave
***************************************
► bit.ly/3OHHoC9
► bit.ly/3IeNLdv
► bit.ly/2J4tPeT
► bit.ly/3ydSkAq
Selenium With Python Using Robert Framework
(Web&API Testing)
*************************************************
► bit.ly/3nUvlpr
► bit.ly/3nUvE3z
API Testing (Postman,SoapUi,&Rest Assured)
**********************************************
► bit.ly/3OXacWY
► bit.ly/3yh0UhE
► bit.ly/3nC9DWQ
► bit.ly/3yGfhNS
► bit.ly/3OJa11H
► bit.ly/3P2slCC
Mobile App Testing Appium
****************************
► bit.ly/3Al49HG
Performance Testing Jmeter
*******************************
► bit.ly/3nz4fE7
Maven,Jenkins,Git,Github,CI/CD
*******************************
► bit.ly/3P16HPj
► bit.ly/3yhlUVA
► bit.ly/3afYfwT
► bit.ly/3yGzweG
► bit.ly/3yF73Ws
► bit.ly/3NCOmH7
SQL,DB Testing&ETL,Bigdata
*******************************
► bit.ly/3NKOcNY
► bit.ly/3OVpDyI
► bit.ly/3NEvUy0
► bit.ly/3IryxlT
► bit.ly/3RkWBLh
JavaScript Based Automation Tools
********************************
► bit.ly/3nUx51X
► bit.ly/3AqI6Q0
► bit.ly/3yeurbT
► bit.ly/3ujzpTK
Selector Hub Tools
********************
►rb.gy/h3h424
GraphQL
********
► rb.gy/sj3gys
Cypress API Testing
*******************
► shorturl.at/fjKPX
Cypress Web Testing
********************
► shorturl.at/agjlK
Playwright with Javascipt
************************
► shorturl.at/adSTY
#SQLInterviewQuestions
#SQLQueryTips
#SQLSalaryRanking
#SQLDataAnalysis
#SQLInterviewPrep
#SQLCodingChallenge
#SQLInterviewAnswers
#SQLQueryOptimization
#SQLWindowFunctions
#SQLAggregateFunctions
#SQLSubqueries
#SQLCommonTableExpressions
#SQLNestedQueries
#SQLSelfJoin
#SQLRankFunction
#SQLDenseRank
#SQLRowNumber
#SQLTopNRows
#SQLLimitOffset
#SQLInnerJoin
#SQLOuterJoin
#SQLCrossJoin
#SQLUnion
#SQLUnionAll
#SQLInterviewSkills
#SQLQueryChallenge
#SQLDatabaseManagement
#SQLInterviewGuidance
#SQLPerformanceTuning
#SQLDataManipulation
#SQLDataFiltering
#SQLDataSorting
#SQLDataGrouping
#SQLDataAggregation
#SQLWindowingFunctions
#SQLCTE
#SQLAdvancedQueries
#SQLDataAnalysisTechniques
#SQLCommonInterviewQuestions
#SQLCodingTips
#SQLPuzzleSolving
#SQLCareerPreparation
#SQLTechnicalInterviews
#SQLQueryChallenges
#SQLInterviewHelp
#SQLSalaryNegotiation
#SQLJobSearchTips
#SQLInterviewSuccess
#SQLQueryPerformance
#SQLCodingSolutions

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 51   
@rushabhsuranse8390
@rushabhsuranse8390 2 года назад
SELECT salary from employee ORDER BY salary DESC LIMIT 1,1; will also give 28000/- i.e. 2nd highest salary. if we want 3rd highest salary SELECT salary from employee ORDER BY salary DESC LIMIT 2,1; this will skip first 2 record and return 3rd record
@prashantp9077
@prashantp9077 2 года назад
Use row number
@RishiRap
@RishiRap Год назад
Wow! Awesome style of teaching! I am a newbie to sql and loving your tutorials.
@sdetpavan
@sdetpavan Год назад
Thanks
@dreamershope2158
@dreamershope2158 2 года назад
sir please stop highlighting or change the colour, we can't see the query
@kaj661
@kaj661 2 месяца назад
You need to highlight when you only want to run that query
@octotube463
@octotube463 2 года назад
Thanks a lot for the detailed explanation. Btw, I think the query need a small tweak on the subquery. Suppose we have one more employee with 28,000 which is a very common scenario ,the above query will fetch the same 28000 for 2nd and 3rd highest salaries. A distinct before salary in the subquery should resolve the duplicate salary issue. Once again Kudos to all your efforts in helping the testing community. 🙏
@ncasmeer1
@ncasmeer1 2 года назад
also use dense rank function and query be like select dense_rank salary over(partition by salary from emploee order by salary)as rn salary where rn salary
@arshadayyubbaghwan3887
@arshadayyubbaghwan3887 Год назад
Thank you so much sir,now my concept is clear
@sdetpavan
@sdetpavan Год назад
Welcome
@rishudhamija9315
@rishudhamija9315 2 года назад
How about this query? select * from employee order by salary Desc limit 1,1;
@universalgamers2524
@universalgamers2524 2 года назад
pta nhi 😅
@safrozeafroze5589
@safrozeafroze5589 2 года назад
Thank you very much Sir for your valuable video…
@lightinlight
@lightinlight 2 года назад
select min(salary) from (select salary from employee order by salary desc limit 2) salarylist ; select min(salary) from (select salary from employee order by salary desc limit n) salarylist ; will this also work for Q.22? Is the above query proper one? Simply curious to know Sir.
@lightinlight
@lightinlight 2 года назад
the above query is working correctly Sir, can we use this or this is not proper way or are there any hidden errors? please reply Sir, Thank you for your videos Sir
@octotube463
@octotube463 2 года назад
@@lightinlight I think the limit and ascending also follow the same logic as Min(salary) and it should work with no issues. All I would add is a distinct before the Salary in the subquery to handle duplicate salaries.
@lightinlight
@lightinlight 2 года назад
@@octotube463 thank you
@riyarohit505
@riyarohit505 2 года назад
Sir.. Query with Limit and top not execute in Oracle SQL developer...is it right....Plz rpl
@tadavarthinaganavya3123
@tadavarthinaganavya3123 2 года назад
Thanks a lot..... Sir, kindly request you that.. while creating maven project in my ecclipse(Luna) i got a error like ... Maven resources plugin 2.6 or one of its dependencies can't be resolved. Please give me advice how I can solve the problem.
@princedua8746
@princedua8746 2 года назад
can't we use this sql query for second highest - select salary from employee order by salary desc limit(1,1);
@avik5855
@avik5855 Год назад
Can we use LIMIT 2,1 for 2nd highest salary. LIMIT 3,1 for 3rd highest salary.
@infinitybeyond4272
@infinitybeyond4272 Год назад
2,1 returns one row after 2nd row means third highest
@youssoufcameroon2565
@youssoufcameroon2565 2 года назад
I am trying to purchase a course on your site but it's failing. I sent email. Please check.
@mohammedamaanhashmi6867
@mohammedamaanhashmi6867 2 года назад
Hi sir can you please share hr table in SQL in SQL tutorial comment section wrong link is give and can you please tell how to download the hr table into MySQL server
@snigdha8794
@snigdha8794 2 года назад
You are excellent..the way you are explaining 👍
@sdetpavan
@sdetpavan 2 года назад
Thanks
@johnfender7479
@johnfender7479 2 года назад
sir if I practice in ms SQL server management studio but at the time of interview I tell them MySQL function like limit then it is consider
@vishnukumar9179
@vishnukumar9179 2 года назад
Thank you so much sir🙏
@saviv1657
@saviv1657 2 года назад
After executing this query in Sql fiddle"Select Top 1 Salary from Employee order by Salary DESC;" I am getting this Error"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 Salary from Employee order by Salary DESC' at line 1"
@exerror1290
@exerror1290 2 года назад
" Note: Not all database systems support the SELECT TOP clause. MySQL supports the LIMIT clause to select a limited number of records "
@rhythmofmusicrudra
@rhythmofmusicrudra 2 года назад
Thank u sir
@sdetpavan
@sdetpavan 2 года назад
Welcome
@ncasmeer1
@ncasmeer1 2 года назад
using Top function u can also write a query like select Top 1 salary from(select Top 2 salary from employee order by desc ) as max sal order by max sal ;
@RohanKumar-vc5ii
@RohanKumar-vc5ii 7 месяцев назад
You are truly a gem sir😇
@sdetpavan
@sdetpavan 6 месяцев назад
Thanks
@vigneshraja2879
@vigneshraja2879 2 года назад
excellent
@sdetpavan
@sdetpavan 2 года назад
thanks
@Deepak-mz6if
@Deepak-mz6if 2 года назад
Sir can we use rownum in oracle for find nth highest salary
@robinthebright
@robinthebright 2 года назад
You're the best 😭❤️😎😊
@sdetpavan
@sdetpavan 2 года назад
Thanks
@snigdha8794
@snigdha8794 2 года назад
Thank you sir 🙏🙂
@sdetpavan
@sdetpavan 2 года назад
Most welcome
@Nandhis
@Nandhis 2 года назад
Great..Thanks 👍
@sdetpavan
@sdetpavan 2 года назад
Welcome 😊
@satishkumarg7403
@satishkumarg7403 2 года назад
thank you so much sir
@sdetpavan
@sdetpavan 2 года назад
Most welcome
@siyaramsingh4986
@siyaramsingh4986 2 года назад
Thanx a lot sir
@sdetpavan
@sdetpavan 2 года назад
Welcome
@prashantajn9933
@prashantajn9933 2 года назад
Excellent 👌
@sdetpavan
@sdetpavan 2 года назад
thanks
@yellayiaruna6170
@yellayiaruna6170 2 года назад
Hi Pavan, If we have 100 records in a table then what will we do? Still we will write 99 sub queries and a query? Won't it take too much time?
Далее
Part2: SQL Query Interview Questions & Answers
26:13
Просмотров 110 тыс.
ОБЗОР НА ШТАНЫ от БЕЗДNA
00:59
Просмотров 277 тыс.
ОБЗОР НА ШТАНЫ от БЕЗДNA
00:59
Просмотров 277 тыс.