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 / syamal rao

You can try the bellow query in BTEQ of TERADATA.


select empname from employee with max(sal),min(sal) by deptid;

Is This Answer Correct ?    1 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What interface is used to connect to windows based applications?

659


What are some commonly used bteq scripts?

632


Hi, If anyone has TD 14 Basics dumps or study materials, please share. nirmaaal1991@gmail.com

2077


How do you define Teradata?

693


i learn teradata,it is so intersting,now i want teradata certifications ,so any 1 help me to get teradata certifications TD 12 ? email:kdcrazyy@gmail.com

1858






How would you load a very large file in teradata in general?

669


In Teradata, what is the significance of UPSERT command?

675


Why does varchar occupy 2 extra bytes?

713


What are the various indexes in teradata? How to use them? Why are they preferred?

682


What is upsert statement in teradata?

696


Explain the term 'database' related to relational database management system?

664


How do you see a ddl for an existing table?

667


Why is the case expression used in teradata?

685


How to find duplicates in a table?

698


In a table can we use primary key in one column and in another column both unique and not null constrains.if yes how?

678