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...

I have a employee table with EMPID, EMPNAME, DEPTID, SAL
and want to fetch the maximum and minimum salary on each
dept id with the emp name. Can anyone help in this? The
result should contain the EMPNAME, DEPTID, SAL.

Answer Posted / gayathri

Sel Empname,deptid, (qualify row_number() over (partition by deptid order by sal asec)=1) as min_sal, (qualify row_number() over (partition by deptid order by sal desc)=1) as max_sal from EMP

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a three-tier data warehouse?

1123


What are the advantages of teradata?

1023


What are the enhanced features in teradata v2r5 and v2r6?

1142


What is oltp?

985


List out all forms of LOCKS that are available in Teradata.

974


How to load specific no.of records using bteq, or fastload,or multiload

1757


What is a dimension table?

1073


How many codd's rules are satisfied by teradata database?

1120


What is TPD?

1384


What are the uses of client software involved in teradata?

991


Explain teradata architecture?

1104


What are the updated features of teradata?

1053


What are the different functions included in the server software?

1046


If RDBMS is halted what will you do ?

2179


how many modules are there in telecome domain?how to explain the architecture?

2025