vital_parsley


{ City } mumbai
< Country > india
* Profession *
User No # 89480
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 3
Users Marked my Answers as Wrong # 3
Questions / { vital_parsley }
Questions Answers Category Views Company eMail




Answers / { vital_parsley }

Question { TCS, 76170 }

find out the second highest salary?


Answer

We can use an OLAP function
select * from
(select ename,sal,dense_rank() over(order by sal desc)
rankings from emp ) a
where a.rankings = 2;

Is This Answer Correct ?    0 Yes 1 No

Question { IBM, 42479 }

How can you find the 2nd Highest salary in a file department wise in abinitio?


Answer

1)use a reformat.
2)Global variable which increments with every records only
if previous record is not equal to current record
3) output_select where sal == 2

Is This Answer Correct ?    3 Yes 2 No