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

xml, basic structure of xm

basic structure of xml

Explain traditional programming languages, How persistent programming langu...

How persistent programming languages differ from traditional programming languages? Database languages vary from traditional programming languages in that they directly manipul

What is substitutability, What is substitutability? Any method of a cla...

What is substitutability? Any method of a class-say A can equally well be adjured with any object belonging to any subclasses B of A. This characteristic leads to code reuse, a

Define weak and strong entity sets, Define weak and strong entity sets? ...

Define weak and strong entity sets? Weak entity set: entity set that do not have key attribute of their own are known as weak entity sets. Strong entity set: Entity set that

Create a database, Project: Microsoft Access You have been asked by the ...

Project: Microsoft Access You have been asked by the ABC Tanning Salon to create a database that can be used to track the salon's customers.  You are to create a table in Access

Define specialisation and generalization in brief, Define Specialisation an...

Define Specialisation and generalization in brief? Specialisation / generalization: Generalization or Specialization represents the is a relationship set, an necessary element

Improve efficiency in query evaluation, Question: AirwaysCentre, an int...

Question: AirwaysCentre, an international airline booking company currently uses a relational database system for their operations, which includes the following relations: P

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