Answer to Question #255980 in Databases | SQL | Oracle | MS Access for RaselNeel

Question #255980

b) Consider the employee data. Give an expression in SQL for the following query:

Employee (employeeName, street, city)

Works (employeeName, companyName, salary)

Company (companyName, city)

Manages (employeeName, managerName)

 i)Find the name and cities of residence of all employees who work for Bangladesh Bank.

 ii)Find all employee in the database who do not work for Bangladesh Bank.

 iii) Find all employee in the database who earn more than every employee of UCB bank.


1
Expert's answer
2021-10-27T06:49:31-0400
i)select employee.employeeName,  employee.city from employee,
 works where employee.employeeName=works.employeeName
 and companyName = 'Bangladesh Bank';
ii) select employee.employeeName,  employee.city from employee,
 works where employee.employeeName=works.employeeName
 and companyName  <> 'Bangladesh Bank';
iii)
select employeeName from works where salary > all
 (select salary from works where companyName = 'UCB bank')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS