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
how do you know if your mysql server is alive? : Sql dba
Is it possible to sort a column using a column alias?
Write a sql query to convert all character to uppercase after hypen.
how to enter numeric values as hex numbers? : Sql dba
Does sql backup shrink transaction log?
What is parallel hint?
Does a primary key have to be a number?
which command using query analyzer will give you the version of sql server and operating system? : Sql dba
how to shut down the server with 'mysqladmin'? : Sql dba
What is type and rowtype in pl sql?
How do you remove duplicates without using distinct in sql?
what is sql server agent? : Sql dba
How do I create an index in word?
Explain the significance of the & and && operators in pl sql.
What is the maximum number of columns in sql table?