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 are the types of reference?explain it with suitable examples? Object oriented language given the ability to refer the object attribute of the type can be referred to the s

Explain the Log Based Recovery Method? The system log that is generally written on stable storage consists of the redundant data required to recover from volatile storage failu

It is not possible to make an ABAP/4 program, which having only Subroutines. False. We can make ABAP/4 program, which having only Subroutines.

Haw does it work one database application

Determine the Strong and Weak Entity Based on the method of foreign key, there might be arise a situation when we have to relate an entity having a primary key of its own and a

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

What is normalization? It is a method of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary key to attain the properties (1).Minim

For every n-ary relationship type R where n>2, we make a new table S to represent R. We contain as foreign key attributes in s the primary keys of the relations that show the parti

What is a hash index? A hash index organizes the search keys, with their associated pointers, into a hash file structure.

What is the use of with clause in SQL? The with clause gives a way of defining a temporary view whose explanation is available only to the query in which the with clause occurs