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 meant by buffer blocks and disk buffer   The blocks residing temporarily in main memory are referred to as buffer blocks. The area of memory where blocks reside t

Analyzing Association Traversal Till now, we have supposed that associations are bi-directional. But in the case of traversal, it is in only one direction in any application,

Create Student DB and perform delete operation? STUDENT (name, student#, class, major) COURSE (course name, course#, credit hours, department) SECTION (section identifier, co

Problem: (a) Given the following relation: Stats(Name,Sex,Children, Occupation, Salary, Tax, Audits) Write SQL code to define the following security constraints: (i) User

To eliminate duplicate rows (distinct operator)  Example: SELECT DISTINCT DEPTNO FROM EMP;

Create an entity relationship diagram, Database Management System

Prepare Heart Failure Registry database How are you today? Please I would like you to design a Heart Failure registry where doctors will log in to enter information about their

What is meant by log-based recovery? The most widely used structures for recording database changes is the log. The log is a sequence of log records, recording all the update a

Describe the statement in SQL which allows to change the definition of a table? In SQL Alter statement is used to allow the changes the definition of a table.

What are ways of finding out either an update is required or not for derived attributes? The ways to find out an update is required or, not are as: Explicit update