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

What are the disadvantages of relational approach, What are the disadvantag...

What are the disadvantages of relational approach? Disadvantages of relational approach: • Substantial hardware and system software overhead • May not fit all business models •

What is a relationship called when it is maintained entities, What is a rel...

What is a relationship called when it is maintained between two entities? A relationship is called Binary relationship when it is maintained between two entities.

Logical entity relationship diagrams, How can i turn a conceptual entity re...

How can i turn a conceptual entity relationship diagram into a logical entity relationship diagram? what do i have to do with "mandetory or" and "optional or" relationships?

Determine the advantage of object-orientation, Determine the advantage of o...

Determine the advantage of object-orientation Finally, object-orientation has advantage of continuity throughout analysis, persistent representation and design implementation.

Physical database design issues, Physical Database Design Issues The da...

Physical Database Design Issues The database design includes the process of logical design with the use of E-R diagram, normalisation, etc., followed by the physical design.

Which operator is used to compare a value to a list literals, Which operato...

Which operator is used to compare a value to a list of literals values that have been specified? BETWEEN operator is used to compare a value to a list of literals values that h

Describe the concept of aggregation, Aggregation Aggregation is strong...

Aggregation Aggregation is stronger form of association. It represents the "has-a" or "part-of" relationship. An aggregation association depicts a complex object which is comp

The file based system in dbms, The File Based System File based systems...

The File Based System File based systems are an early attempt to computerise the manual filing system. For example, a manual file can be set up to hold all the correspondence r

Difference between functions along with or without grouping, Explain the di...

Explain the difference between using functions along with and without grouping attributes in relational algebra. Give examples. Ans: Group functions are used to group data of

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