Question: Assuming a library database schema with the following tables and attributes: Book (BookID, Title, AuthorID, PublisherID, Rating, Price) Author (AuthorID, FirstName, LastName) Publisher (PublisherID, Name)
Assuming a library database schema with the following tables and attributes:
Book (BookID, Title, AuthorID, PublisherID, Rating, Price)
Author (AuthorID, FirstName, LastName)
Publisher (PublisherID, Name)
Borrower (BorrowerID, FirstName, LastName)
- Write a SQL query to retrieve the names of all authors who have written a book published by "Penguin Books".
- Write a SQL query to retrieve the total number of books borrowed by each borrower.
- Write a SQL query to retrieve the names of all publishers who have published at least one book with a rating of 4 stars or higher.
- Write a SQL query to calculate the average price of books.
- Write a SOL query to find the maximum price of books.
Assuming a library database schema with the following tables and attributes: Book (BookID, Title, AuthorID, PublisherID, Rating, Price) Author (AuthorID, FirstName, LastName) Publisher (PublisherID, Name) Borrower (BorrowerID, FirstName, LastName) 1- Write a SQL query to retrieve the names of all authors who have written a book published by "Penguin Books". 2- Write a SQL query to retrieve the total number of books borrowed by each borrower. 3- Write a SQL query to retrieve the names of all publishers who have published at least one book with a rating of 4 stars or higher. 4- Write a SQL query to calculate the average price of books. 5- Write a SQL query to find the maximum price of books
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
