i have a table
eno dno sal
1 10 200
2 10 150
3 10 100
4 20 75
5 20 100

i want to get sal which is less than the avg sal of thri dept.

eno dno sal
2 10 150
3 10 100
4 20 75

Answer Posted / parth

select salary from eno where salary<(select avg(salary)
from eno ) and rownum < 6

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is indexes?

548


Which data type is a composite type?

534


how to load data files into tables with 'mysqlimport'? : Sql dba

528


What are procedures used for?

531


What is an implicit commit?

561






In pl/sql, what is bulk binding, and when/how would it help performance?

537


What view means?

558


What are the types of sql commands?

555


What are the different types of constraints?

566


What do you mean by stored procedures?

553


What are the types of keys?

516


What are different types of queries in sql?

528


What are the different types of a subquery?

525


Can one improve the performance of sql*loader? : aql loader

587


What mean sql?

585