Database system concept 7th based on Exercise problems 3.9, 3.10, 3.16, and 3.17) Consider the relational database of Figure 3.19, where the primary keys are underlined. Given an expression in SQL for each of the following queries. Find the ID of each employee who does not work for “First Bank Corporation”. SQL Query: Find the ID, name, and city of residence of each employee who works for “First Bank Corporation” and earns more than $10,000. SQL Query: Find the ID of each employee who earns more than every employee of “Small Bank Corporation”. SQL Query:

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Database system concept 7th

based on Exercise problems 3.9, 3.10, 3.16, and 3.17) Consider the relational database of Figure 3.19, where the primary keys are underlined. Given an expression in SQL for each of the following queries.

  1. Find the ID of each employee who does not work for “First Bank Corporation”. SQL Query:
  2. Find the ID, name, and city of residence of each employee who works for “First Bank Corporation” and earns more than $10,000. SQL Query:
  3. Find the ID of each employee who earns more than every employee of “Small Bank Corporation”. SQL Query:
  4. Assume that companies may be located in several cities. Find the name of each company that is located in every city in which “Small Bank Corporation” is located. Your query should run on. SQL Query:
  5. Find the name of the company that has the most employees (or companies, if there is a tie). SQL Query:
  6. Find the name of each company whose employees earn a higher salary on average, than the average salary at “First Bank Corporation”. SQL Query:
  7. Modify the database so that the employee whose ID is ‘12345’ now lives in a city called “Newtown”. SQL Query:
  8. Find ID and name of employee who lives in the same city as the location of the company for which the employee works. SQL Query:
  9. Find ID and name of each employee who earns more than the average salary of all employees of her or his company. SQL Query:
  10. Find the company that has the smallest payroll (sum of all salary in a company). SQL Query:
  11. Given all employees of “First Bank Corporation” a 10 percent raise. SQL Query:

  12. Delete all tuples in the works relation for employees of “Small Bank Corporation”. SQL Query:

employee (ID, person name, street, city)
works (ID, compапу name, salarу)
сотрany (сompаny name, city)
manages (ID, manager.id)
Figure 3.19 Employee database.
Transcribed Image Text:employee (ID, person name, street, city) works (ID, compапу name, salarу) сотрany (сompаny name, city) manages (ID, manager.id) Figure 3.19 Employee database.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY