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 |
explain the delete statements in sql
What is the starting oracle error number?
what is an associative array with example?
What is string join?
What are sql functions? Describe the different types of sql functions?
Why do we use subquery?
What are the attributes of SQL*PLUS ?
2 Answers Dream Careers, Oracle,
What is the trigger in sql?
how to shutdown mysql server? : Sql dba
Two Methods of retrieving SQL?
7 Answers Atiric Software, Microsoft, Oracle, TCS, Wipro,
what is index? : Sql dba
what is myisam? : 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)