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 SQL query which should fetch the 5th maximum salary
of an employee from the table?

Answers were Sorted based on User's Feedback



Write a SQL query which should fetch the 5th maximum salary of an employee from the table?..

Answer / prashant

SELECT min(salary)
from emp
where salary in (select distinct top 5 salary from emp
order by salary desc)

Is This Answer Correct ?    1 Yes 3 No

Write a SQL query which should fetch the 5th maximum salary of an employee from the table?..

Answer / vsandhyana

select top 1 * from (select top 5 * from customers order by
salary desc) a order by salary asc

Thanks
Vikram Sandhyana

Is This Answer Correct ?    0 Yes 3 No

Write a SQL query which should fetch the 5th maximum salary of an employee from the table?..

Answer / rakesh

select rownum as rank,name,sal
from
( select name,sal from employees order by sal desc)
where
rownum=5

Is This Answer Correct ?    3 Yes 7 No

Write a SQL query which should fetch the 5th maximum salary of an employee from the table?..

Answer / pavan kumar

select * from emp e where 5=(select count(distinct sal)
from emp e where e.sal<=sal)

Is This Answer Correct ?    3 Yes 8 No

Post New Answer

More Cognos Interview Questions

Hi, In My Table i am having a Column Emp ASa Fullname In My Report I WAnt First name&Lastname?how I'll Get This One?Pls Ans Me

2 Answers  


Why need staging area database for dwh?

0 Answers  


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

2 Answers   HCL,


11. Which is a collection of data defined in Analysis Studio that can be saved and reused in the same analysis? a. Custom set b. Predefined set c. Level based set d. Measure set 12. In a list report in Report Studio there are 3 columns A,B,C and they are grouped by Col A. To show the values of Col A for every value of Col B , which of following steps should be taken? a. Ungroup b. Set Group span to Col A c. Set Group span to Col B 13. Which of following cant be set as a Governer in FM? a. no of tables to b selected in a query b. Left outer joins c. No of Columns to be selected in a query d. Cross Product joins 14. Purpose of analysis studio? a. To provide interactive reporting capability b. All the options c. To generate complex reports d. To help in more trend analysis 15.How to suppress Nulls in Analysis Studio reports? a. Choose the suppression as TOTAL > 0 b. Choose the suppression as TOTAL is NULL c. Choose the suppression as TOTAL is ZERO d. Choose the suppression as TOTAL is not NULL 16.Frame work Manager cant import Metadata from which of folowing? a. Decision Stream b. XML datasource c. Impromptu Catalogs d. Excel Sheets 17. In a report, to perform aggregation using aggregator expression, what should we use? a.Aggregation LIst b.Aggregation type c.Aggregation mode d. None 18. What is the role for gateways? Thanks in Advance

1 Answers  


1. We have been asked to add summary information to sales reprasentatives performance report. The report needs to be grouped by country and city to compare performance between areas Also we need to include revenue totals for each city and each country.

0 Answers  


If we run a report, that has 2 pages, i want to display one page in HTML format and another page wil display in pdf format. What is the procedure?

2 Answers   IBM, Polaris,


i'm searching on cognos..i want to know real time scenarios..persons having real time exp or undertaking trainings or who searching on cognos...can send me the details...for proper guidence..for project and interview preparation..pls help me out..my mail-id is ammu2india@gmail.com..hope u will respond as soon as possible..thanks..

0 Answers  


When we save a report in report studio with what extn it save?

0 Answers  


describe the starschema grouping ?how can i add a new column for existing report ,when it is not present even in model & dataabase?

0 Answers  


What is the enterprise class platform architecture of cognos 8?

0 Answers  


These are the questions asking in many interviews, so pls help me,,, How did you get requirements from the client? How did you send reports to the client? How did you interact with your client? I mean through e- mail or phone or in any other way?

2 Answers   IBM,


In my Report C-id c-name Revenue are the query items I need to display the report has Alternative colors for rows and Revenue >=1000 has display in another color? i.e Both c-id,c-name are applying the alternative color(red,yellow) condition and revenue (blue) u think..How its possible? Iam doing for alternative colors i defined Two dataitems as running-count and Mod... and next in Boolean varaible define as [Query1].[Data Item2] = 1 or 0 and [Query1].[Revenue]>=1000 as like this (it's correct or not) and define in condition explorer yes and no purpose two colors(here how to define 4 revenue color) By selecting the list columns body style its applying only the Body and run report it working only for alternative colors Next i defined by using same Boolean condition for revenue like this. For selecting only the Revenue Body and define as yes 4 one color and no for another color? But here it the revenue column also applying only the alternative color condition and it's taking the >=1000 condition... So,i need to display 2 columns have alternative colors and 3rd column >=1000 cell have another color any body pls give me the replay/answer in step wise..... Thank u Basha

0 Answers   TCS,


Categories