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

Accessing information permissions users, Accessing information about permis...

Accessing information about permissions to all users- Object level permissions: With the use of data dictionary you can see the permissions to user. Let us get the table name fro

Write query to insert data in student table, Consider student (std_id, std_...

Consider student (std_id, std_name, date_of_birth, phone, dept_name). Put the data for a student with student id200, name arun, birth date 1 February, 1985, phone number (01110 328

BMIS 351, Ask question #MinimRead Dennis et al. Chapter 6: Minicase 2. Work...

Ask question #MinimRead Dennis et al. Chapter 6: Minicase 2. Work through it and answer the questions. See the attached example. SequenceDiagram.png Based on the structural mod

External failure-database recovery and security, External failure : A failu...

External failure : A failure can also result because of an external cause, such as earthquakes, fire, floods, etc. The database must be duly backed up to avoid troubles occurring d

Describe all integrity constraints which are violated, Consider the two rel...

Consider the two relations given below Given that A is the primary key of R, D is the primary key of S and there is a referential integrity among S.A and R.A, discuss all

Implementing a distributed database system, A distributed database is defin...

A distributed database is defined as "a collection of multiple logically interrelated database which are physically distributed over a computer network" (a) Give any three advan

Mention the several levels in security measures, Mention the several levels...

Mention the several levels in security measures. A) Database system B) Operating system C) Network D) Physical Human

What is the difference between link and reference, What is the difference b...

What is the difference between link and reference? The fundamental difference between links and references is that links are symmetrical on the other hand references refer only

What is storage manager, What is storage manager?  A  storage  manager ...

What is storage manager?  A  storage  manager  is  a  program  module  that  gives  the  interface  between the Low level data  kept in a database and the application programs

What disadvantage of odbc does ole db overcome, What disadvantage of ODBC d...

What disadvantage of ODBC does OLE DB overcome? By breaking the features and the methods of a DBMS into COM objects, OLE DB characteristic overcomes a main disadvantage of ODBC

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