No video

Oracle interesting questions and answers | SQL to find the N th maximum salary

  Рет қаралды 30,186

Siva Academy

Siva Academy

Күн бұрын

Oracle interesting questions and answers | SQL to find the N th maximum salary without using rownum or rank function or subquery
12c row limiting clause : • Oracle New feature 12c...
RANK vs DENSE_RANK(): • Oracle interview quest...
Correlated subquery : • Oracle PL SQL intervie...
--------------------------------------------------------------
This channel is for learning Oracle SQL, PLSQL, DATABASE concepts, MYSQL, ETL, Mongo DB, Python,UNIX and related technologies.
/ sivaacademy
Home page: sivakacademy.b...
Telegram Channel : t.me/SivaAcademy
--------------------------------------------------------------
Home page: sivakacademy.b...
List of all oracle SQL/PLSQL Interview questions sivakacademy.b...
List of all PLSQL Scenario based Interview Questions sivakacademy.b...
List of all Subscriber questions and answers sivakacademy.b...
--------------------------------------------------------------
Oracle Interview questions playlist • oracle interview quest...
Oracle 18C New features playlist • Oracle 18C New Feature
Oracle 12C New features playlist • Oracle 12C New Feature...
Oracle PLSQL records and collections playlist • oracle plsql records a...
--------------------------------------------------------------
My video courses at UDEMY www.udemy.com/...
--------------------------------------------------------------
About Myself:
----------------------
I am Siva, [LEARN | CODE | TRAIN | SHARE].
Being in IT industry for more than 12+ years.
In my day to day job, I work with database technologies including Oracle, Java, Python, MongoDB, talend and UNIX.
I am passionate about "DATA", coding & training.
In my spare time, I teach database technologies , ETL etc.
I am very glad that you are reading my Profile, and I value your time as well as mine.
Looking forward to see you in my videos
For any questions, please drop me a mail at siva.k.academy@gmail.com
--------------------------------------------------------------

Пікірлер: 61
@manideepkumar959
@manideepkumar959 3 жыл бұрын
1st rownum u explained well, later ur simply typing something and not explaining what r u writing,in subquery why r u writing b.sal>=a.sal?
@abheshkumar2232
@abheshkumar2232 3 жыл бұрын
Write a procedure to update salary 10% and select employees. Without using parameters.
@Ram-tf8ir
@Ram-tf8ir 3 ай бұрын
Great work❤
@bhaskaro
@bhaskaro 2 жыл бұрын
Thanks for explaining different methods to find the N'th max salary, also please make a video which methods of these are efficient.
@diptikokate7348
@diptikokate7348 8 ай бұрын
Thank you so much sir
@saktibiswal6445
@saktibiswal6445 3 жыл бұрын
Subscribed!! Awesome Channel and very good explanation! Definitely learnt from this
@SivaAcademy
@SivaAcademy 3 жыл бұрын
Thank you 💐
@mukeshchitte3870
@mukeshchitte3870 3 жыл бұрын
Great, happy to listen to u, thanks a lot 🙂
@SivaAcademy
@SivaAcademy 3 жыл бұрын
My pleasure, thank you 💐💐🙏
@anushaa1471
@anushaa1471 3 жыл бұрын
Sir, thank you for this GREAT VIDEO👍. Could you please elaborate the method 3 approach .? Why we are taking count of distinct salary there?
@AparnaBL
@AparnaBL 3 жыл бұрын
Lady since there is a duplicate salary 10000. He mentioned twice same point 🤔🤔🤔🤔🤔😏
@manikandanpanneer1650
@manikandanpanneer1650 Ай бұрын
Thanks Dear Bro 🙏🙋‍♂️😍
@SivaAcademy
@SivaAcademy Ай бұрын
Welcome bro 🙏
@minicat1983
@minicat1983 3 жыл бұрын
Or use nth_value function Select distinct nth_value(sal,5) over (order by sal desc range between unbounded preceding and unbounded following) rn From emp;
@deepakranjanmishra3
@deepakranjanmishra3 3 жыл бұрын
Sir very good explanations.Thank you so much for your extended support to make it.Much appreciated.
@SivaAcademy
@SivaAcademy 3 жыл бұрын
Welcome 🙏💐💐
@tshende02
@tshende02 2 жыл бұрын
Thank you so much
@SivaAcademy
@SivaAcademy 2 жыл бұрын
You're most welcome
@devinenibalaji9038
@devinenibalaji9038 2 жыл бұрын
Hi siva , Request to pls clearly explain the subquery method
@rajasekarp7873
@rajasekarp7873 2 жыл бұрын
👍Super bro👏
@SivaAcademy
@SivaAcademy 2 жыл бұрын
Thank you
@crazycom9807
@crazycom9807 3 жыл бұрын
Thanks a lot for such a detailed explanation..
@SivaAcademy
@SivaAcademy 3 жыл бұрын
Thank you
@pra1bhus1
@pra1bhus1 3 жыл бұрын
Great content. I don't know who is the one disliked this video
@SivaAcademy
@SivaAcademy 3 жыл бұрын
Thank you 💐
@sravankumar3674
@sravankumar3674 Жыл бұрын
Hi .... Any video which will return multiple rows using object type in function?
@sansurvase2
@sansurvase2 2 жыл бұрын
You are Amazing ! 👏👏🙌
@SivaAcademy
@SivaAcademy 2 жыл бұрын
Thank you bro
@sujaa1000
@sujaa1000 2 жыл бұрын
Thanks again Siva!
@SivaAcademy
@SivaAcademy 2 жыл бұрын
My pleasure!
@kapilsrivastava8007
@kapilsrivastava8007 3 жыл бұрын
Excellent answer
@SivaAcademy
@SivaAcademy 3 жыл бұрын
Welcome bro 💐
@sampurnabhattacharjee9748
@sampurnabhattacharjee9748 Жыл бұрын
will this query work for the above question Select Salary FROM(SELECT DISTINCT SALARY FROM EMPLOYEE ORDER BY Salary DESC FETCH FIRST 2 ROWS ONLY) ORDER BY SALARY ASC FETCH FIRST 2 ROWS ONLY
@SatyendraSingh-ul5iq
@SatyendraSingh-ul5iq 3 жыл бұрын
Thanks shiva, please let us know that difference between force view and inline view.
@SivaAcademy
@SivaAcademy 3 жыл бұрын
Ideally we should not compare both, posted both cocepts seperalty
@PrayasITandRobotics
@PrayasITandRobotics 2 жыл бұрын
Seems fetch first don't work in 11g. So kindly do mention the oracle version. If possible in each video.
@vsr1727
@vsr1727 3 жыл бұрын
Thank you siva👍
@SivaAcademy
@SivaAcademy 3 жыл бұрын
Welcome
@dfhwze
@dfhwze 3 жыл бұрын
Can you also do it using match_recognize or a recursive function?
@ashokkumar-hm5on
@ashokkumar-hm5on Жыл бұрын
select salary rank() over(order by salary desc),DENSE_RANK()OVER(order by salary desc)from employees not working
@Pmreedy801
@Pmreedy801 3 жыл бұрын
Great sir ,😍😍
@SivaAcademy
@SivaAcademy 3 жыл бұрын
Thank you 💐
@SriLife2
@SriLife2 3 жыл бұрын
Can u do the same to find group wide nth sal without rank, analytical, rownum functions.
@SivaAcademy
@SivaAcademy 3 жыл бұрын
No, for finding group wise salary, analytical function is the best approach
@sumanthreddy1139
@sumanthreddy1139 2 жыл бұрын
sir can i have latest recorded videos if i pay u the money..
@SivaAcademy
@SivaAcademy 2 жыл бұрын
Hi Sumanth, no need to pay, I was not feeling good last couple of weeks, will be start posting from next week onwards, please stay tuned
@kumarbrajesh5051
@kumarbrajesh5051 3 жыл бұрын
How to count Number of column in a table without using metadata in Sql
@SivaAcademy
@SivaAcademy 3 жыл бұрын
Will answer in upcoming video in this series, please stay tuned.
@ravipatisrikanth8331
@ravipatisrikanth8331 3 жыл бұрын
Sir ,how to find difference between salaries in emp table
@SivaAcademy
@SivaAcademy 3 жыл бұрын
Differences between what two salaries??
@ravipatisrikanth8331
@ravipatisrikanth8331 3 жыл бұрын
No two salaries, you can 5 or 6 salaries like 2000,1800,1600,1000,800
@ravipatisrikanth8331
@ravipatisrikanth8331 3 жыл бұрын
I know how to find out the difference between two salaries but I don't know how to find out more than two salaries
@ravipatisrikanth8331
@ravipatisrikanth8331 3 жыл бұрын
One guy asked in my interview
@ravipatisrikanth8331
@ravipatisrikanth8331 3 жыл бұрын
So please write a query sir
@thulasireddy4514
@thulasireddy4514 3 жыл бұрын
Sir oracle full course unda
@SivaAcademy
@SivaAcademy 3 жыл бұрын
Not yet bro
@feyie
@feyie Жыл бұрын
Hi Siva, can u help me? I need to get the sum of the total value of each element that's grouped per pay date. And I need to display it in my report as one row . Here's the sample data (4 rows): Column1: Pay date 15-Jan-2022 30-Jan-2022 15-Jan-2022 30-Jan-2022 Column2: element Pay allowance Pay allowance2 Pay allowance Pay allowance2 Column3: total 500 300 500 300 I used a case statement but it doesn't work. SELECT a.personid, TRUNC(TO_DATE(a.pay_date, 'DD-MON-YYYY')) pay_date CASE WHEN a.element LIKE 'Pay Allowance%' OR 'Pay Allowance2' THEN 'Pay Allowance Benefit' ELSE NULL END as Pay_Allowance_Benefit , SUM(a.total) FROM (SELECT tbl4.personid, TRUNC(TO_DATE(tbl3.val_date, 'DD-MON-YYYY')) pay_date ,tbl2.name element ,tbl1.value total FROM tbl1 ,tbl2 ,tbl3 ,Tbl4 Where clause) a WHERE a.personid = :p_id GROUP BY a.element , a.person_id , TRUNC(TO_DATE(a.pay_date, 'DD-MON-YYYY'))
白天使选错惹黑天使生气。#天使 #小丑女
00:31
天使夫妇
Рет қаралды 15 МЛН
wow so cute 🥰
00:20
dednahype
Рет қаралды 32 МЛН
1 PLSQL Performance Tuning   Introduction to DBMS PROFILER
23:33
Siva Academy
Рет қаралды 112 М.
Oracle Interview Question oracle index related questions
14:11
Siva Academy
Рет қаралды 144 М.
Scenario Based Question | Oracle Database SQL Tricky Interview Questions
9:01
Oracle SQL and PLSQL Tricky Interview Questions
Рет қаралды 29 М.
Oracle 23C New Features | SELECT Without FROM Clause
9:36
Siva Academy
Рет қаралды 7 М.
Practice SQL Interview Query | Big 4 Interview Question
14:47
白天使选错惹黑天使生气。#天使 #小丑女
00:31
天使夫妇
Рет қаралды 15 МЛН