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

Why do I get java.lang.abstractmethoderror when trying to load a blob in the db?

558


Explain what are the uses of rollback segment?

586


what is the difference between substr and instr function in oracle?

586


I have a table called 'test' on source and target with same name, structure and data type but in a different column order. How can you setup replication for this table?

628


How to create a table index in oracle?

662






What is system global area (sga) in oracle?

576


What will be the syntax to find current date and time in format "yyyy-mm-dd"?

570


Explain about integrity constraint?

606


How does one get the view definition of fixed views/tables?

606


How to start an oracle instance?

574


What privilege is needed for a user to delete rows from tables in another schema?

562


In not less than 100 words what's the main difference between Rolap and Molap in ORACLE ?

1786


What happens if you lost a data file?

584


Explain rename?

554


How do you bind variables in oracle?

548