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’

Design of distributed databases, Design Of Distributed Databases: The dist...

Design Of Distributed Databases: The distributed databases are mainly relational at local level. So a local database schema is the similar as that of a centralised database design

Search the name department number and salary of employees , Example : Searc...

Example : Search the name, department number and salary of employees drawing minimum salary in that department. SELECT ENAME, SAL, DEPTNO  FROM EMP WHERE SAL IN (SELECT MI

Process to find the non-concurrent objects, Process to find the non-concurr...

Process to find the non-concurrent objects Once we find out non-concurrent (mutually exclusive) objects, we can fold all objects together in one thread of process or control. O

Define the five basic operators of relational algebra, Define the five basi...

Define the five basic operators of relational algebra? Five basic operators of relational algebra are: 1. Union (∪∪∪∪) - Selects tuples which are in either P or Q or in both

What is hierarchical dbms, What is Hierarchical DBMS In HDBMS, data is ...

What is Hierarchical DBMS In HDBMS, data is structured in a tree like manner. There is a parent-child relationship between data items and the data model is very suitable for re

What are the functions of an accumulator, What are the functions of an accu...

What are the functions of an accumulator? The accumulator is the register associated with the ALU operations and sometimes I/O operations. It is an integral part of ALU. It hol

E-r model uses this symbol to represent weak entity set, E-R model uses thi...

E-R model uses this symbol to represent weak entity set ? A Doubly outlined rectangle symbol is used to represent weak entity set.

Hierarchical data representation model, Examples:- Hierarchical Model: I...

Examples:- Hierarchical Model: It tells data as and relationships by hierarchy of data values. Figure illustrates an example of hierarchical model. Now a day's these models are

Alter table command, ALTER TABLE Command : This command is used for variati...

ALTER TABLE Command : This command is used for variation of existing structure of the table in the given situation: When a new column is to be added to the table structure.

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