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 would you load a very large file in teradata in general? What utility would you use for it? Why?
What is collect statistics?
What is bteq utility in teradata?
How is the teradata different from oracle?
What do you mean by fastexport in teradata?
Backup Script was blocked then you are unable to archive the data. how do you analyze it and where do you identify ?
What is teradata? Also, list out some of the primary characteristics of teradata.
What is the purpose of joins in teradata?
Explain the term 'database' related to relational database management system?
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?
Which is more efficient group by or distinct to find duplicates?
What is spool space?
what is object level locking ? where do appear this type of locking ?
Highlight the limitations of TPUMP Utility.
Can you fastexport a field, which is primary key by putting equality on that key?