select top 3 sal from each dept?

Answer Posted / ashwini

Select * from emp A where 2>=(select count(distinct(B.sal)) from emp B where A.sal<B.sal);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is subquery faster than join?

743


Does sql backup shrink transaction log?

736


What is scalar data type in pl sql?

788


what is data integrity? : Sql dba

782


what are the different tables present in mysql? : Sql dba

680






Explain the the update statement in sql?

770


What is difference between inner join and cross join?

716


Can you call pl/sql package functions from within a fast formula?

769


What are all the common sql functions?

751


Can you join views in sql?

721


What happens when a trigger is associated to a view?

677


What are the parts of a basic sql query?

724


What is a native sql query?

701


How would you reference column values before and after you have inserted and deleted triggers?

820


What company owns postgresql?

772