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

Can you define cognos powerplay?

0 Answers  


what is boxtype

1 Answers   IBM,


In framework Manager, what is a stitch query and is it good or bad?

2 Answers   Polaris,


suppose i want to do drill through a column only for the values which is having more than > 50000. how can i do that?

2 Answers   Mind Tree,


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

1 Answers   L&T,


what is session parameters? what is use?

1 Answers   HCL, Satyam,


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?

1 Answers   HSBC,


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

0 Answers  


What is the difference between the standard and metrics folder?

0 Answers  


what is prompt types of prompt example briefly each types of product (eg:values, date,search,prompt etc.)

1 Answers   HCL, Syntel,


What are the roles defined by cognos platform?

0 Answers  


What is cognos reporting tool?

0 Answers  


Categories