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

Which is faster fastload or multiload?

599


Explain and compare pros and cons of snow flake schemas?

613


What is meant by a Virtual Disk?

580


Why does varchar occupy 2 extra bytes?

612


What is inner join and outer join?

620






What is the use of teradata system software?

553


What do you mean by fastexport in teradata?

561


How to identify ppi columns?

659


Is it necessary to add? Quit statement after a bteq query when I am calling it in a unix environment?

654


What tools would you use for that?

572


Why managing the data is important?

594


What are the various reporting tools in the market?

618


What do high confidence, low confidence and no confidence mean in explain plan?

592


What are aggregate tables? How do you design them using teradata?

638


Explain PDE.

608