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 Explicit update In explicit update, each derived attribute is defined with respect to one, or more fundamental base object(s). The object designer determines that de

Determine the rule that a value of a foreign key should appear as a value of some particular table is called a  Ans: Referential constraint.    The rule that a value of a fo

Define Partial Key and Primary Key A partial key, also known as discriminator, is the set of attributes which can uniquely identify weak entities that are related to similar o

how to write a in a text and load it on mysql

Using Relational Algebra which query finds customers, who have a balance of over 1000 ? Using Relational Algebra Π Customer_name( σ balance >1000(Deposit)) is query to find cu

What does the extract statement do in extract datasets? The data is written to virtual memory by extract commands.


Explain Foreign Key? Foreign Key - Let there are two relations (tables) R and S. Any candidate key of the relation R that is referred within the relation S is known as the fo

What is an E-R model? Draw an E-R Diagram for the company database with following Descriptions? The company is organized within departments. Each department has a unique name a

Function requirement as given: 1> manage fans and likes and followings those information from facebook. twitter. google+ and linkedin etc 2> Organize the clients from email m