I have one table :EID,Depid,ename,sal
I want to have max(sal) in each department.

Answer Posted / sunil

select depid,max(sal) from <table name> group by depid;

Is This Answer Correct ?    33 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does sharding mean?

537


What is dual table oracle?

526


How do I escape a reserved word in oracle?

624


How many types of table in Oracle?

614


What is a tns file?

500






Explain how are indexes update?

619


How to export data to a csv file?

620


How to get a list of all user accounts in the database?

612


How to insert multiple rows with one insert statement in oracle?

568


What is Virtual Private Database in Oracle?

616


How to experiment a data lock in oracle?

593


What is the maximum limit on the number of columns in a table?

549


How to run the anonymous block again?

595


Please explain compound trigger in oracle?

594


State and explain the different types of data models?

530