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’

Explain naivebayessimple algorithem, Use the IRIS dataset that comes with W...

Use the IRIS dataset that comes with Weka to compare the classification performance of the following algorithms. 1. NaiveBayesSimple 2. MultiLayerPerceptron J48 (

Explain transaction manager and their work, Explain Transaction manager and...

Explain Transaction manager and their work? Transaction Manager: Ensure the database remains in a constant (correct) state despite system failure, and in which concurrent trans

Data dictionary, how to prepare a data dictionary for online examination sy...

how to prepare a data dictionary for online examination system for certified courses?

C PROBLEMS, how to solve the C type problems?

how to solve the C type problems?

Keys - relational database integrity, Candidate Key:  In a relation R, a ca...

Candidate Key:  In a relation R, a candidate key for R is a subset of the set of attributes of R, which have the differnt two properties: (1)        Uniqueness:                N

Physical model of traffic data management, After the completion of the logi...

After the completion of the logical model the physical model is to be made. The oracle 10 G will be used as a database server and all the tables with their column are created and i

Private Tuition, Hi, Do you offer private tuition for DBMS?

Hi, Do you offer private tuition for DBMS?

Define transitive dependencies, What do you understand by transitive depend...

What do you understand by transitive dependencies? Define with an example any two problems that can take place in the database if transitive dependencies are available in the datab

Design and prototype, This assignment is worth 45% of your final grade for ...

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

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