Find names of employees, Database Management System

Assignment Help:

Consider the relations
EMP(ENO,ENAME,AGE,BASIC_SALARY)
WORK_IN(ENO,DNO)
DEPT(DNO,DNAME,CITY)
Express the following queries in SQL
(i) Find names of employees who work in a deptt. in Delhi.
(ii) Get the deptt. number in which more than one employee is working.
(iii) Find name of employee who earns highest salary in ‘HR' department.

(i) select ENAME from EMP, WORK_IN, DEPT where EMP.ENo= WORK_IN.ENO and WORK_IN.DNO= DEPT.DNO and CITY= ‘Delhi';
(ii) select DNO from WORK_IN group by DNO having count(*) >1
(iii) select ENAME from EMP e where BASIC_SALARY >= (select max(BASIC_SALARY) from DEPT,WORK_IN where DNAME = ‘HR' and e.ENO = WORK_IN.ENO and WORK_IN. DNO= DEPT.DNO)


Related Discussions:- Find names of employees

Explain the process-oriented decomposition, Breaking into Subsystems D...

Breaking into Subsystems Decomposition is a significant technique for coping with complexity based on idea of divide and conquers. In dividing a problem into sub problems, the

Er diagrams, in an organization several projects are undertaken. Each proje...

in an organization several projects are undertaken. Each project can employ one or more employees. Each employee can work on one or more projects. Each project is undertaken on the

Critically evaluate the bulleted list of information, Critically evaluate t...

Critically evaluate the bulleted list of information-related items in this case study. How are each contradictory to the notion of being an information-literate knowledge worker?

How we can implement relationships when designing tables, You want to imple...

You want to implement following relationships when designing tables. How would you do it? a.) One-to-one b.) One-to-many c.) Many-to-many a.) One-to-One relationship -

What is a query tree, What is a query tree?     Ans:  A query tree, as ...

What is a query tree?     Ans:  A query tree, as well known as operator graph, is a tree data structure that corresponds to a relational algebra expression. It denotes the inpu

Benefits and drawbacks of sequential file organisation, Benefits of Sequent...

Benefits of Sequential File Organisation It is quick and efficient when dealing with huge volumes of data that require being processed periodically (batch system). Dra

Create a data flow diagram, For your chosen project, you need to identify t...

For your chosen project, you need to identify the current problem that you wish your project to solve.  Produce a Problem Statement.  The Problem Statement should explain the purpo

What is the function of sql server agent windows service, What is the funct...

What is the function of SQL Server Agent Windows service? - It's a Windows service that handles tasks scheduled within SQL Server environment. These tasks are also known as job

What are the objectives of object design, What are the Objectives of object...

What are the Objectives of object design After going through this unit, you could be able to: explain steps of object design; discuss algorithms that reduce costs;

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