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
This assignment is worth 45% of your final grade for this module.  Marks will be awarded as follows: Prototypes (wireframe and web based prototype) You are expected

Drawbacks of Data Distribution: The primary drawbacks of distributed database systems are the added complexity needed to ensure proper coordination between the sites. This increas

Having Clause with sub queries: First we have to recollect the GROUP BYclause. The following query searches the minimum salary in every department. SELECT DEPTNO, MIN (SAL)

what are the reasons having variable length records

Explain how you can define an object model of a system. A list of terms that shall be used by end users to describe state and behaviour of objects in system.   Different use

An employee record has the following structure struct employee { int eno; char name[22]; float salary; char dept[10];}; (i) Calculate the record size R in bytes.

In a relation, tuples are not inserted in any definite order. Ordering of tuples is not defined as a part of a relation definition. Though, records may be structured later accordin

Define the concept of aggregation.  Give two examples where this concept is useful. Ans: Aggregation transforms a relationship among the objects into a higher-level object. A

Record based Logical Models: Use records as the key data representation components Examples: Relational Model: It shows data as well as relationship between data in the form

What is an entity relationship model? The entity relationship model is a set of basic objects known as entities and relationship between those objects. An entity is a thing or