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 / prasant
select sal from demo where sal<(select avg(sal) from demo
where eno in (2,3,4));
NOTE:first create table demo and insert all these 5 rows
then run querry.
If any issue call me(PRASANT)
| Is This Answer Correct ? | 4 Yes | 5 No |
Post New Answer View All Answers
Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?
How to assign sql query results to pl sql variables?
What are predefined functions in sql?
What does count (*) do in sql?
what are all different types of collation sensitivity? : Sql dba
What is a primary key sql?
what are the nonstandard string types? : Sql dba
What is pl sql in dbms?
Is sql injection illegal?
What is sql profiler in oracle?
What is server name sql?
What are records give examples?
how to return query output in html format? : Sql dba
What is a procedure in pl sql?
What is sql character function?