Expression in sql for employee database


Q1. Consider the given employee database, where the primary keys are underlined. Give an expression in the SQL for each of the given queries:

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

A) Find out the names of all the employees who work for First Bank Corporation.

B) Find out the names and cities of residence of all the employees who work for First Bank Corporation.

C) Find out the names, street addresses and cities of residence of all the employees who work for the First Bank Corporation and earn more than $10,000.

D) Find out all the employees in the database who live in the similar cities as the companies for which they work.

E) Find out all employees in the database who live in the similar cities and on the same streets as do their managers.

F) Find out all the employees in database who don’t work for First Bank Corporation.

G) Find out all the employees in database who earn more than each employee of Small Bank Corporation.

H) Suppose that the companies might be located in several cities. Find out all companies located in every city in which the Small Bank Corporation is located.

I) Find out all the employees who each more than the average salary of all the employees of their company.

Request for Solution File

Ask an Expert for Answer!!
Database Management System: Expression in sql for employee database
Reference No:- TGS010257

Expected delivery within 24 Hours