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
How can you track login parameters of users in teradata?
What does Amp contain and what are all the operations that it performs?
Is multi insert ansi standard?
What do you mean by teradata sql assistant?
What is the meaning of Caching in Teradata?
What is called partitioned primary index (ppi) and discuss the advantages of using it in a query?
What are the 5 phases in a multiload utility?
What can be achieved by using the teradata rdbms?
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
How to find duplicates in a table?
what is object level locking ? where do appear this type of locking ?
Why is the case expression used in teradata?
What are the various indexes in teradata?
How to eliminate product joins in a teradata sql query?
Explain the term 'row' related to relational database management system?