write a query to display to 10 max record from the employee
table?
Answers were Sorted based on User's Feedback
Answer / sandy
select top 10 * from employee order by salary desc
| Is This Answer Correct ? | 6 Yes | 3 No |
Answer / phoebe
select * from
(
select * from employee
order by salary desc)
where rownum<11;
| Is This Answer Correct ? | 4 Yes | 2 No |
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 |
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 |
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 |
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 |
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 |
The vice president of sales has requested a report that shows sales performance by representatives in each country for year 1998. He would also like to see the performance for reprasentatives in Asia in order to present an award to the top sellers when he visits next month.
While running the reports how can we hide totals if the users doesnot requie it?
advantages of cascade prompt ???
How to limit the cut,copy and paste operations for an user in reportlevel? Can anyone please send me the steps as i am new to cognos?
Can anyone explain the procedure for configuring cognos8 with oracle as Content Manager/Content Store? I know the configuration of cognos8 with SQL SERVER (Like how to create CM database in oracle and applying securities to access that Database from cognos8 (Cognos Configuration)
i was asked what are the caluclations done by you in your report? plz give reply
What is a Transformer?
how to get the all values from a prompt using 'ALL' use and display value in prompt
--------------Explain Table of contents?
what is loop in frameworkmanager ?
what are the dimensions that you have in your current project?list them?
What is namespace and what it holds?