DATABASE SYSTEM CONCEPTS (LOOSELEAF)
DATABASE SYSTEM CONCEPTS (LOOSELEAF)
7th Edition
ISBN: 9781260515046
Author: SILBERSCHATZ
Publisher: MCG
Students have asked these similar questions
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 given bank database. Compose SQL Queries for each of below scenarios. branch(branch_name,branch_city,assets) customer(customer_name,customer_address,customer_city) loan(loan_number,branch_name,amount) borrower(customer_name,loan_number) account(account_number,branch_number,balance) depositer(customer_name,account_number) a. Find the names of all branches located in “Chicago”. b. Find the names of all borrowers who have a loan in branch “Downtown”. c. Find all loan numbers with a loan value greater than $10,000. d. Find the names of all depositors who have an account with a value greater than $6,000.
Consider the library database of Figure 3.20.Write the following queries in SQL.a. Find the member number and name of each member who has borrowedat least one book published by “McGraw-Hill”.b. Find the member number and name of each member who has borrowedevery book published by “McGraw-Hill”.c. For each publisher, find the member number and name of each memberwho has borrowed more than five books of that publisher.d. Find the average number of books borrowed per member. Take into accountthat if a member does not borrow any books, then that member doesnot appear in the borrowed relation at all, but that member still counts inthe average.
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