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

Answers were Sorted based on User's Feedback



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

Answer / parth

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

Is This Answer Correct ?    0 Yes 3 No

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

Answer / vin

select * from emp group by deptno having sal < avg(sal)

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL PLSQL Interview Questions

What is a data definition language?

0 Answers  


What is sql table?

0 Answers  


How does index help in query performance?

0 Answers  


package specification-3 procedures package body-2 procedures will is execute

2 Answers   PWC,


Does normalization improve performance?

0 Answers  






what is the difference between truncate and delete statement? : Transact sql

0 Answers  


What is sql data?

0 Answers  


What is serial sql?

0 Answers  


What is a full join sql?

0 Answers  


how to concatenate two character strings? : Sql dba

0 Answers  


How many LONG columns are allowed in a table?

6 Answers   CTS,


What does the base_object_type column shows in the user.triggers data dictionary view?

0 Answers  


Categories