763 views
0 votes
0 votes
Consider the employee database, where the primary keys are
underlined. Give an expression in SQL for each of the following queries.

a. Find the names of all employees who work for “First Bank Corporation”.

b. Find all employees in the database who live in the same cities as the
companies for which they work.

c. Find all employees in the database who live in the same cities and on
the same streets as do theirmanagers.

d. Find all employees who earn more than the average salary of all
employees of their company.

e. Find the company that has the smallest payroll.

 

here is the database

employee (employee name, street, city)
works (employee name, company name, salary)
company (company name, city)
manages (employee name, manager name)

Please log in or register to answer this question.

Related questions