Employee 7566 salary is extra than salary of employee 7788, Database Management System

Assignment Help:

Example: -Show the employees whose job title is the similar as that of employee 7566 and salary is extra than the salary of employee 7788.

Let consider the given partial relation EMP. Let us make some sub-queries for them

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 ENAME, JOB

FROM EMP

WHERE JOB =   (SELECT JOB  

                            FROM EMP

                            WHERE EMPPNO = 7566)

                 AND SAL > (SELECT SAL

                                       FROM EMP

                                       WHERE EMPPNO=7788);

 

Output: Job title for the employee 7566 occurs to be 'MANAGER')

ENAME

JOB

Ashwini

MANAGER


Related Discussions:- Employee 7566 salary is extra than salary of employee 7788

Er diagram, Design a generalization–specialization hierarchy for a motor-ve...

Design a generalization–specialization hierarchy for a motor-vehicle sales company. The company sells motorcycles, passenger cars, vans, and buses. Justify your placement of attrib

DBMS, what is specialization?

what is specialization?

Define the phases of two phase locking protocol, Define the phases of two p...

Define the phases of two phase locking protocol Growing phase: a transaction may get locks but not release any lock. Shrinking phase: a transaction might be release locks bu

Define the term domain, Define the term Domain. For each n every attrib...

Define the term Domain. For each n every attribute there is a set of permitted values known as the domain of that attribute.

Describe in brief about object oriented design, Describe about Object orien...

Describe about Object oriented design Object oriented design is concerned with developing an object oriented model of a software system to implement known requirements. Many OO

Create a view containing name and number of department, Create a view emp_d...

Create a view emp_dep containing e_name and number of dependents from the tables employee and dependent of (i) CREATE VIEW emp_dept AS SELECT ename, COUNT(*) FROM employee, dep

Microeconomic, anyone have a textbook solutions case fair, 8 edition of vo...

anyone have a textbook solutions case fair, 8 edition of vol 1 ?, please give me

Create table employee and enter employee data in sql, Create table employee...

Create table employee and enter employee data in SQL? Consider the following relational schemas: EMPLOYEE (EMPLOYEE_NAME, STREET, CITY) WORKS (EMPLOYEE_NAME, COMPANYNAME, SAL

Coursework, ERD Diagram of Medical Recruitment Agency?

ERD Diagram of Medical Recruitment Agency?

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