Find out employee who draws salary more than average , Database Management System

Example: Find out the employee who draws a salary more than the average salary of all the departments.

EMPNO

ENAME

JOB

SAL

DEPTNO

7566

Nirmal

MANAGER

2975

10

7788

Kailash

ANALYST

3000

10

7839

Karuna

PRESIDENT

5000

20

7902

Ashwin

ANALYST

3000

20

7905

Ashwini

MANAGER

4000

20

 

 

SELECT EMPNO, ENAME, JOB, SAL

FROM EMP

WHERE SAL> ALL (SELECT AVG (SAL)

FROM EMP

                  GROUP BY DEPTNO);

 OUPUT:

EMPNO

ENAME

JOB

SAL

7839

Karuna

PRESIDENT

5000

Posted Date: 3/11/2013 3:58:32 AM | Location : United States







Related Discussions:- Find out employee who draws salary more than average , Assignment Help, Ask Question on Find out employee who draws salary more than average , Get Answer, Expert's Help, Find out employee who draws salary more than average Discussions

Write discussion on Find out employee who draws salary more than average
Your posts are moderated
Related Questions
What is a Built-in A notation of identity is built-into the data model or programming language and no user-supplied identifier is needed. This form of identity is used in objec

write an SQL statement to create the database in MYSQL server

Hi there, Have an issue with my Database. I have: TblOrderDetails and FmOrderDetails TblCircuit and FmCircuit Whenever I add data into the Form, it will update the table as expect

What is Object Oriented model? This model is based on collection of objects. An object has values stored in instance variables with in the object. An object also having bodies

Can your organization scan large format documents? Yes, large format scanning used for such entities as city plans and blueprints is available. We selected scanners with the ab

The ER diagram clearly showing the additional tables you have implemented. SQL table creation scripts for the tables you have set up. SQL scripts showing the sample data you

example of embedded SQL query

Load sample data into the database tables design and test queries to return the following information • All rows and columns for employees • All rows and columns for customers •

Define Physical and Logical independence  Ans: Physical data independence: The ability to modify physical level without causing application program to be rewritten. Logic

Define Join and Outer Join and differentiate between them.      Ans: Join - It generates all the combinations of tuples from two relations which satisfy a join condition.  Oute