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
What is the use of fallback?
How do you set the session mode parameters in bteq?
What is the opening step in basic teradata query script?
How would you load a very large file in teradata in general?
any one answer me how they can analyzing the project using data ware housing?
Highlight the differences between Primary Key and Primary Index.
What is the purpose of using case expression in teradata?
What is dimensional modeling?
Explain the term 'database' related to relational database management system?
How do you create tables? Exact syntax, and create profiles, users in teradata?
What type of indexing mechanism do we need to use for a typical data warehouse?
List out teradata data types?
What is meant by a Highest Cost Plan?
During the Display time, how is the sequence generated by Teradata?
What is the difference between global temporary tables and volatile temporary tables?