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
In BTEQ, how are the session-mode parameters being set?
What is the function of parser component in teradata?
What do you mean by teradata sql assistant?
any one answer me how they can analyzing the project using data ware housing?
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?
What are the available join types in teradata?
Is it necessary to add? Quit statement after a bteq query when I am calling it in a unix environment?
How is MLOAD Client System restarted after execution?
What are the 5 phases in a multiload utility?
Can we collect statistics on table level?
Explain the term 'row' related to relational database management system?
Did you write stored procedures in teradata?
Highlight a few of the advantages that ETL tools have over Teradata.
Explain fastload in teradata?
If I wanted to run a TPump job only once per day - basically working on a file that is produced once per day - how would you set up the parameters for that sort of job ?