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 |
What is a memo field?
How do I turn a list into a table?
Can we create table inside stored procedure?
how do you tune the slow running queries in oracle db , explain the methodology
select 1,col1,col2 from table1. output?
What do you understand by case manipulation functions?
What is Primary Key?
Question: Below is the table city gender name delhi male a delhi female b mumbai male c mumbai female d delhi male e I want the o/p as follows: male female delhi 2 1 mumbai 1 1 Please help me in writing the query that can yield the o/p mentioned above?
what are the types of join and explain each? : Sql dba
How does pl sql work?
What is data definition language?
Give me some examples of predefined exceptions.
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)