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 |
Can you define cognos powerplay?
what is boxtype
In framework Manager, what is a stitch query and is it good or bad?
suppose i want to do drill through a column only for the values which is having more than > 50000. how can i do that?
I have Date,product,Quantity_Sold columns and I want Product, MTD(month Till date),YTD(Year Till Date) as output. Can anyone help me with the logic in getting MTD i.e quantity sold from 1st of this month to till date (i.e. 01- 11-2013 to 26-11-2013) and YTD i.e QTD sold from 1st date of the year to till date(i.e. 01-01-2013 to 26-11-2013). Sample output model: Product MTD YTD
what is session parameters? what is use?
Cognos TM1 1. What are the different windows in Turbo Integrator? 2. What is the use of advanced window in Turbo Integrator? 3. What is TM1 Workflow. How do you create a process in that? 4. Where is Portlet used. What are differnt windows in portlet. How can you access TM1 web from portlet? Cognos 8. 1. What is Drill-on? 2.How do you implement row level security in Framework Manager? 3. How do you create tree prompt?
Please answer me the below questions, It's really urgent, and ur help would be appreciated. 1. What is looping in FM? How do u control it 2. How do u create IQDs in FM? Explain 3. What are the diff u noticed between Cognos 8.2 and Cognos 8.4 4. Can we use cube as a data source? How 5. How do u connect ur database in FM? do u connect directly 6. What's the structure of your database? Say u use Oracle 7. Did you use tables or views to bring the data from your DB 8. Does the dimensions of analysis studio have hierarchy? 9. Did you create any dashboards? How u created, explain
What is the difference between the standard and metrics folder?
what is prompt types of prompt example briefly each types of product (eg:values, date,search,prompt etc.)
What are the roles defined by cognos platform?
What is cognos reporting tool?