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

How can you track login parameters of users in teradata?

1234


What does Amp contain and what are all the operations that it performs?

1055


Is multi insert ansi standard?

2254


What do you mean by teradata sql assistant?

1115


What is the meaning of Caching in Teradata?

1186


What is called partitioned primary index (ppi) and discuss the advantages of using it in a query?

1084


What are the 5 phases in a multiload utility?

1090


What can be achieved by using the teradata rdbms?

1092


hi frnds i want to learn teradata utilities and teradata dba real time. i have 1+ years of experience in teradata. so i want to go deeply in Tearada. plz let me know at my email id who r best to learn from. im lookng for a realtime guy in HYD or Banglr. Thanks in advance. Rajesh my email-id: rajeshmss87@gmail.com

2917


How to find duplicates in a table?

1277


what is object level locking ? where do appear this type of locking ?

3545


Why is the case expression used in teradata?

1138


What are the various indexes in teradata?

1100


How to eliminate product joins in a teradata sql query?

1087


Explain the term 'row' related to relational database management system?

1001