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
Explain fallback in teradata?
What is a dimension table?
What are default access rights in teradata? What explicit right can be given to a user?
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?
Difference between stored procedure and macro?
What is teradata?
How can we check the version of Teradata that we are using currently?
Define views in teradata with syntax.
How to run a query in teradata?
What is oltp?
What is the difference between fastload and multiload? Which one is faster?
What is the basic syntax for teradata select statement?
If RDBMS is halted what will you do ?
What are the different design perspectives used in teradata?
What are some primary characteristics of teradata?