[solved] – Question 8290
1. Consider the following relation schema:
Employee (emp_name, emp_street, emp_city)
Works (emp_name, Company_name, salary)
Company (company_name, city)
Manager(emp_name, manager_name)
For each of the following queries, write SQL statements:
i. Find the name of all employees who work for First Bank Corporation
ii. Find the name and city of residence of all employees who work for First Bank Corporation.
iii. Find the name, street, city of residence of all employees who work for First Bank Corporation
and earn more than Rs 15,000 per month.
iv. Find all such employees who do not work for First Bank Corporation.
v. Find the name of all employees who lives in the same city as the company they work for.
vi. Find the company with smallest payroll.
vii. Find all employees who earn more than all employees of Small Bank Corporation.
viii. Assuming that a company may be located in several cities, find the name of the companies that
are locate in every city where Small Bank Corporation is located.
ix. Find the company with maximum number of branches.
x. Find the company that have maximum employees.
Expert Answer
OR

