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 / madhu

select * from emp where sal<(select avg(sal) from emp where
eno in(2,3,4))

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are character functions in sql?

494


what is bdb (berkeleydb)? : Sql dba

566


What is a table?

565


What is a schema? How is it useful in sql servers?

591


Show the cursor attributes of pl/sql.

608






What schema means?

521


What are some predefined exceptions in pl/sql?

548


Explain the working of primary key?

604


Which software is used for pl sql programming?

519


How do I run a sql script?

510


how to rename an existing column in a table? : Sql dba

509


What does the argument [or replace] do?

579


what are the authentication modes in sql server? : Sql dba

528


What is trigger and types?

562


What is database sql?

539