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
Answer / parth
select salary from eno where salary<(select avg(salary)
from eno ) and rownum < 6
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / vin
select * from emp group by deptno having sal < avg(sal)
| Is This Answer Correct ? | 0 Yes | 3 No |
Is sql database free?
What is scalar data type in pl sql?
What is the use of prepared statement?
Differences between UNIQUE and DISTINCT in select statements
26 Answers ABS, DELL, Deloitte, Hewitt, Oracle, Verinon Technology Solutions, Wipro,
What are the possible values that can be stored in a boolean data field?
use of IN/ANY/ALL
What is the advantage of index in sql?
When do we create bitmap indexes
Explain what is sql*plus?
What is anonymous block in sql?
what is mean by forward declaration and where we'll use it.
what is the difference between cluster and non cluster index? : Sql dba
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)