Question: Please do not answer if you cannot answer all of them. Problem 6. Answer 6.1-6.2 using Employee database employee (employee name, street, city) works (employee

 Please do not answer if you cannot answer all of them.Problem 6. Answer 6.1-6.2 using Employee database employee (employee name, street, city)

Please do not answer if you cannot answer all of them.

Problem 6. Answer 6.1-6.2 using Employee database employee (employee name, street, city) works (employee name, company_name, salary) company (company name, city) manages (employee name, manager_name) Figure 6 Employee database. 6.1 Consider the employee database of Figure 6, where the primary keys are underlined. Give an expression in SQL for each of the following queries. a. Find the names and cities of residence of all employees who work for First Bank Corporation. b. Find the names, street addresses, and cities of residence of all employees who work for First Bank Corporation and earn more than $10,000. c. Find all employees in the database who do not work for First Bank Corporation. d. Find all employees in the database who earn more than each employee of Small Bank Corporation. e. Assume that the companies may be located in several cities. Find all companies located in every city in which Small Bank Corporation is located. f. Find the company that has the most employees. g. Find those companies whose employees earn a higher salary, on average, than the average salary at First Bank Corporation. 6.2 Consider the relational database of Figure 6. Give an expression in SQL for each of the following queries. a. Modify the database so that Jones now lives in Newtown. b. Give all managers of First Bank Corporation a 10 percent raise unless the salary becomes greater than $100,000; in such cases, give only a 3 percent raise. (use case statement)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!