Name Salary
Abc 50000
Abc 50000
xyz 20000
find the max salary using aggregate function?

Answers were Sorted based on User's Feedback



Name Salary Abc 50000 Abc 50000 xyz 20000 find the max salary using aggregate ..

Answer / guest

select max(sal) from tab_name;
or
select * from tab_name where sal=(select max(sal) from
tab_name) and rownum<=1;

Is This Answer Correct ?    20 Yes 0 No

Name Salary Abc 50000 Abc 50000 xyz 20000 find the max salary using aggregate ..

Answer / prashant

select max(salary) from
(select distinct(salary) from ABC)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

what is top in tsql? : Transact sql

0 Answers  


Is there any problem if we use commit repeatedly after each dml statement in a plsq procedure ? (eg. there are 10 update stmt and using 10 commit stmt after each update stmt)

1 Answers  


What jobs use sql?

0 Answers  


Which is better join or inner query?

0 Answers  


Why do we need databases?

0 Answers  






Can we group by two columns in sql?

0 Answers  


what is a database lock ? : Sql dba

0 Answers  


what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba

0 Answers  


What are stuff and replace function?

0 Answers  


what is uncommittable transactions? : Transact sql

0 Answers  


Define sql delete statement.

0 Answers  


How do I run pl sql in sql developer?

0 Answers  


Categories