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

Discuss along with examples about several types of er model, Discuss along ...

Discuss along with examples about several types of attributes present in the ER model? Types of Attributes are: • SIMPLE attributes are attributes which are drawn from the ato

FIELDS, 4. Describe three ways to handle missing field values

4. Describe three ways to handle missing field values

Organic compounds, #question.explain diversity and magnitude of organic com...

#question.explain diversity and magnitude of organic compounds and general properties?

I need helpin assignment, My cut off date is very soon in a Database subjec...

My cut off date is very soon in a Database subject and i dont know how to solve anything in it

Functional dependency, Functional Dependency Consider a relation R that...

Functional Dependency Consider a relation R that has 2 attributes A and B. The attribute B of the relation is functionally dependent on the attribute A if and only if for every

Give detail description on transactions, Give detail description on Transac...

Give detail description on Transactions. - Using transactions we can group all SQL commands into a single unit. - Transaction begins with some task and finishes only when a

Determine the Disadvantages of file based systems, Determine the Disadvanta...

Determine the Disadvantages of file based systems Some of the disadvantages of file based systems are like this: Data redundancy and inconsistency: the dissimilar applic

Explain olap and the benefits of olap, Data Mining 1. What is data mini...

Data Mining 1. What is data mining? Write Data Mining applications. 2. Explain OLAP? Write the benefits of OLAP. 3. What are the key features of a Data Warehouse? 4. W

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