Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Students have asked these similar questions
Consider the relational database of Figure 3.19, where the primary keys are underlined. Give an expression in SQL for each of the following queries.a. Find the ID, name, and city of residence of each employee who works for “First Bank Corporation”.b. Find the ID, name, and city of residence of each employee who works for “First Bank Corporation” and earns more than $10000.c. Find the ID of each employee who does not work for “First Bank Corporation”.d. Find the ID of each employee who earns more than every employee of“Small Bank Corporation”.e. Assume that companies may be located in several cities. Find the nameof each company that is located in every city in which “Small Bank Corporation” is located.f. Find the name of the company that has the most employees (or companies, in the case where there is a tie for the most).g. Find the name of each company whose employees earn a higher salary, on average, than the average salary at “First Bank Corporation”.
Consider the employee database of Figure 3.19, where the primary keys areunderlined. Give an expression in SQL for each of the following queries.a. Find ID and name of each employee who lives in the same city as thelocation of the company for which the employee works.b. Find ID and name of each employee who lives in the same city and on thesame street as does her or his manager.c. Find ID and name of each employee who earns more than the averagesalary of all employees of her or his company.d. Find the company that has the smallest payroll.
Consider the insurance database of Figure 3.17, where the primary keys areunderlined. Construct the following SQL queries for this relational database.a. Find the number of accidents involving a car belonging to a person named“John Smith”.b. Update the damage amount for the car with license plate “AABB2000”in the accident with report number “AR2197” to $3000.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education