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
Does truncate require commit?
What is pl sql collection?
What is pl sql commands?
What is the difference between instead of trigger and after trigger?
Is sql a microsoft product?
Why do we use cursors?
what is the difference between rownum pseudo column and row_number() function? : Sql dba
What is exit statement?
What is a primary key? Explain
When is a declare statement required?
what is cursor. write example of it. What are the attributes of cursor.
What is a delimiter in sas?
what are the different tables present in mysql? : Sql dba
Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?
Can variables be used in sql statements?