GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Data Warehousing  >  Informatica
Go To First  |  Previous Question  |  Next Question 
 Informatica  |  Question 163 of 631    Print  
what is the procedure to write the query to list the highest salary of three employees?

  
Total Answers and Comments: 7 Last Update: November 07, 2006     Asked by: renukhareddy 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
December 01, 2005 07:31:41   #1  
thiyagarajanc Member Since: November 2005   Contribution: 4    

RE: what is the procedure to write the query to list t...

select

        sal

from

        (select sal from emp order by sal desc)

where

        rownum <= 3;


 
Is this answer useful? Yes | No
December 05, 2005 03:08:34   #2  
Rishi        

RE: what is the procedure to write the query to list t...
SELECT sal
FROM (SELECT sal FROM my_table ORDER BY sal DESC)
WHERE ROWNUM < 4;

 
Is this answer useful? Yes | No
December 20, 2005 07:54:13   #3  
kalyan        

RE: what is the procedure to write the query to list t...

hai

 there is max function in Informatica use it.

kalyan


 
Is this answer useful? Yes | No
March 22, 2006 13:18:52   #4  
Ray Anthony        

RE: what is the procedure to write the query to list t...

since this is informatica.. you might as well use the Rank transformation.  check out the help file on how to use it.

Cheers,

Ray Anthony


 
Is this answer useful? Yes | No
April 25, 2006 07:50:03   #5  
Deshmukh Sachin        

RE: what is the procedure to write the query to list t...
select max(sal) from emp;
 
Is this answer useful? Yes | No
April 27, 2006 09:25:53   #6  
prasad        

RE: what is the procedure to write the query to list t...

 the following is the query to find out the top three salaries

in ORACLE:--(take emp table)

select * from emp e where 3>(select count (*) from emp where

e.sal>emp.sal) order by sal desc.

in SQL Server:-(take emp table)

select top 10 sal from emp


 
Is this answer useful? Yes | No
November 07, 2006 08:34:07   #7  
Neeraj        

RE: what is the procedure to write the query to list t...
You can write the query as follows.SQL> select * from 2 (select ename,sal from emp order by sal desc) 3 where rownum<=3;
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape