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 would you load a very large file in teradata in general? What utility would you use for it? Why?

1033


What is collect statistics?

947


What is bteq utility in teradata?

916


How is the teradata different from oracle?

1033


What do you mean by fastexport in teradata?

940


Backup Script was blocked then you are unable to archive the data. how do you analyze it and where do you identify ?

1902


What is teradata? Also, list out some of the primary characteristics of teradata.

980


What is the purpose of joins in teradata?

1067


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

929


Can we have two time dimensions in a schema(either star or snow flake)? For ex if we want joining date of employee and if we want today's sales with time whether can we have two time dimensions for accommodating above tasks?

2038


Which is more efficient group by or distinct to find duplicates?

1035


What is spool space?

1074


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

3446


Highlight the limitations of TPUMP Utility.

1048


Can you fastexport a field, which is primary key by putting equality on that key?

1116