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

Assignment Help:

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


Related Discussions:- Find out employee who draws salary more than average

Wait-die scheme -deadlock prevention, Wait-die" scheme : The idea is based ...

Wait-die" scheme : The idea is based on non-preventive method. It is based on a simple rule:                                 If Ti requests a database resource that is held by T

What is stored procedure, What is Stored Procedure? A stored procedure ...

What is Stored Procedure? A stored procedure is a named group of SQL statements that have been previously formed and kept in the server database. Stored procedures accept input

What is view in sql, What is view in SQL? How is it defined? Any relati...

What is view in SQL? How is it defined? Any relation that is not part of the logical model, but is made visible to a user as a virtual relation is known as a view. We descri

Describe the concepts of structural semantic data model, Question 1 List a...

Question 1 List and explain various Normal Forms. How BCNF differs from the Third Normal Form and 4th Normal forms? Question 2 Describe the concepts of Structural Semantic Da

Explain i command in qbe, Explain I command in QBE ? I : It is the co...

Explain I command in QBE ? I : It is the command in QBE that is used to insert tuple (s) into the database

Define blocks, Define blocks? The database system resides eternally on ...

Define blocks? The database system resides eternally on non-volatile storage, and is into fixed-length storage units known as blocks.

Example of grant create session to mca12, Example -GRANT CREATE SESSION TO ...

Example -GRANT CREATE SESSION TO MCA12; (This command gives system level permission on creating a session - not portable) GRANT SELECT ON EMP TO MCA12; (Object level permi

Describe query evaluation engine, Describe Query evaluation engine? Que...

Describe Query evaluation engine? Query Evaluation engine: Vehicle executes low-level instructions obtained through the DML compiler. The Storage Manager Components gives in

ERD, A student entity type has the following attributes,name..

A student entity type has the following attributes,name..

When is update_statistics command used, When is UPDATE_STATISTICS command u...

When is UPDATE_STATISTICS command used? - When processing of large data is done, this command is used. - Whenever large number of modification, deletions or copy takes place

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd