Search the salary of employees who are not ‘analyst’ , Database Management System

Assignment Help:

Example-Search the salary of employees who are not 'ANALYST' but get a salary below than or equal to any people employed as 'ANALYST'.

SELECT EMPNO, ENAME, JOB, SAL

FROMEMP

WHERE SAL <= ANY (SELECT SAL

                                     FROM EMP WHERE JOB = 'ANALYST')

            AND JOB<>'ANALYST' ;

 

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

OUTPUT:

EMPNO

ENAME

JOB

SAL

7566

Nirmal

MANAGER

2975

 

Search the average salary in every department

SELECT DEPTNO, AVG(SAL) FROM EMP GROUP BY DEPTNO;

Result:

 

DEPTNO

SAL

10

2987.5

20

4000

 


Related Discussions:- Search the salary of employees who are not ‘analyst’

What is known as heap file organization, What is known as heap file organiz...

What is known as heap file organization? In the heap file organization, any record can be placed anywhere in the file where there is space for the record. There is no ordering

Neo4j, I have one assignment that has to be done in neo4j

I have one assignment that has to be done in neo4j

Is siteground database over limit, I am using Siteground. And my databas...

I am using Siteground. And my database is full of limit so need someone who reduces the data which no need. This is very simple and simple task. Skills required are Databa

Difference between internal tables and extra datasets, What is the differen...

What is the difference between internal tables and extract datasets? The lines of an internal table always have the similar structure. By using extract datasets, you can ha

Explain the cascadeless schedule, Explain the Cascadeless Schedule A ca...

Explain the Cascadeless Schedule A cascadeless schedule is one in which for every pair of transactions Ti and Tj like that Tj reads a data item before written by Ti, the commit

Marketing interface, as a customer service employee explain five measures y...

as a customer service employee explain five measures you would recommend to make even a displeased students patronize the school canteen

Define data model, Define data model? A data model is a collection of c...

Define data model? A data model is a collection of conceptual tools for explaining data, data relationships, data semantics and consistency constraints.

xml, basic structure of xm

basic structure of xml

What is advantage of two-way association, What is advantage of two-way asso...

What is advantage of two-way association? Two-way association advantages are following: a) Independent of the classes. b) Useful for existing predefined classes that are

What is the meaning of data independence, What is the meaning of Data indep...

What is the meaning of Data independence? Data independence means a programs that are not dependent on the physical attributes of data and a programs that are not dependent on

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