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 cartesian join in sql?

0 Answers  


How do you respond to dementia behavior?

0 Answers  


How can we make an if statement within a select statement?

0 Answers  


what is the functionality of the function htmlentities? : Sql dba

0 Answers  


What is difference between CHAR and VARCHAR2?What is the maximum SIZE allowed for each type?

6 Answers   Saama Tech,






How to display the contents of a current record fetched in a reference cursor?

2 Answers  


How can we link a sql database to an existing android app?

0 Answers  


What are aggregate and scalar functions?

0 Answers  


Table Student has 3 columns,Student_id,Student_Name & Course_Id. Table Course has 2 columns, Course_Id & Course_Name.Write a query to listdown all the Courses and number of student in each course.

10 Answers   TCS,


List the various privileges that a user can grant to another user?

0 Answers  


what is data integrity? : Sql dba

0 Answers  


What are all ddl commands?

0 Answers  


Categories