Back To Normal

Subscribe To Our E-Mail Newsletter

Thursday, June 17, 2010

Find out nth Highest salary from Emp table

SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal); Output : n=2 , it will display 2nd highest salary from table. Otherwise We can use rank statement to find second largest:
select column1
from
(
select column1 rank() over (order by column1 desc) rank from
(select distinct(column1) from table1)
)
where rank 2;

Simple Solution:
-----------------
 Select max(Column1) from table1 where Column1 < (select max(Column1) from table1)
Read More


Thursday, June 3, 2010

Define Priority and Severity?

severity defines the importance of defect with respective to functional point of view..

priority defines the importance of defect with respective to customer point of view
Read More


560 Free Online Courses

Top 200 universities launched 500 free online courses.  Please find the list here .