Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write a query to display to 10 max record from the employee
table?

Answers were Sorted based on User's Feedback



write a query to display to 10 max record from the employee table?..

Answer / sandy

select top 10 * from employee order by salary desc

Is This Answer Correct ?    6 Yes 3 No

write a query to display to 10 max record from the employee table?..

Answer / phoebe

select * from
(
select * from employee
order by salary desc)
where rownum<11;

Is This Answer Correct ?    4 Yes 2 No

write a query to display to 10 max record from the employee table?..

Answer / madhusudhan

select rownum rn,(select e.* from emp e)
order by sal desc
where rn>=&rn;

Is This Answer Correct ?    1 Yes 0 No

write a query to display to 10 max record from the employee table?..

Answer / ram

select * from
(
select e.*,dense_rank() over(order by sal desc) rank from emp e
)
where rank<=&rank

Is This Answer Correct ?    0 Yes 0 No

write a query to display to 10 max record from the employee table?..

Answer / nasa

select *from emp where sal in(select max(sal) from emp where level<=10 connect by prior sal>sal group by level);


This query show the top 10 records based on the salary

Is This Answer Correct ?    0 Yes 0 No

write a query to display to 10 max record from the employee table?..

Answer / narender.v

select * from emp x where &n=(select count(distinct sal)
from emp y where x.sal<=y.sal)

it will prompt for the value give the values as 10 u will
get the output

Is This Answer Correct ?    2 Yes 6 No

write a query to display to 10 max record from the employee table?..

Answer / rajasivam.p

To find nth value

select salary from emp a where &n=(select count(distinct
salary) from emp b where a.empno<=b.empno);

to find max by nth value a.empno<=b.empno
to find min by nth value a.empno>=b.empno

OR

To find 10 max records

select * from (select * from emp order by salary desc) where
rownum<=&n;

Is This Answer Correct ?    0 Yes 4 No

write a query to display to 10 max record from the employee table?..

Answer / madhoo

select * from emp a
where (select count(distinct sal) from emp b where
a.sal<b.sal)=&n order by sal desc
/


this is the exact query........when there are duplicate
salaries are there also........

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More Cognos Interview Questions

what is the automation tool used for data warehouse testing???

3 Answers   Covansys, IBM, Wipro,


Can you define folder?

0 Answers  


How can we create a dynamic column name in cognos?

0 Answers  


suppose a value prompt contains 100 values and i want to select all values in that prompt....i want ALL option in the value prompt? how can u keep this option in value prompt?

5 Answers   TCS,


fiscal year means what???

8 Answers   iFlex, iGate,


Can you define cognos powerplay?

0 Answers  


drillthrough vs master detaild report,which one is the best by performance?

3 Answers   IBM,


What do you understand by ‘ibm predictive maintenance and quality’?

0 Answers  


What is the use of Excel files in Cognos8?

1 Answers  


I have the below IBM COGNOS 8 Certification latest Dumps: COG-112: IBM Cognos 8 BI Author COG-122: IBM Cognos 8 BI Administrator COG-125: IBM Cognos 8 BI Data Warehouse Developer COG-132: IBM Cognos 8 BI Metadata Model Developer COG-135: IBM Cognos 8 BI OLAP Developer COG-145: IBM Cognos 8 BI Multidimensional Author COG-180: IBM Cognos 8 BI Professional Recently new questions also have been updated in this Dump. If interested,mail me on kris.bi121@gmail.com with Exam Code and Exam name

37 Answers   Cisco, L&T,


How can I test reports in cagonos?

0 Answers  


Explain difference between powerplay transformer and power play reports?

0 Answers  


Categories