Question: Section:2 -- Write down SQL Queries for the following questions based on above ER Diagram, 1. How many books do each author wrote? 2. List

Section:2 -- Write down SQL Queries for the following questions based on above ER Diagram,
1. How many books do each author wrote?
2. List the book titles of all books that are held at the Henrys Downtown branch. Use nested queries only ie. no table joins
3. What is the title of the book with the second lowest price? List the book title and price
4. Which Book has the second highest availability (units on hands) in the table?
5. Which Book is not available at Henrys Brentwood
6. List the publishers (and the number of books they published) who have published 10 or more books.
7. Identify the authors who are wrote more than 3 books and which locations their books are available?
8. For all book types contains more than 5 published books, display the earliest publish dates for each book type.
book bookcode CHAR(4) book te VARCHAR(100) l publisher publisher code CHAR(2) publisher_name VARCHAR(30) publisher_city VARCHAR(30) publisher state VARCHAR(3) branch branch_no INT (11) branch_name VARCHAR (50) branch locaton VARCHAR(50) no employees INT(11) publisher-code CHAR(2) book type CHAR(3) book_price DECIMAL (5,2) paperback CHAR(1) publish_date DATETIME Indexes Indexes wrote Book code CHAR (4) invent ? bookcode CHAR(4) branch_no INT (11) units on hand INT (11) Author number CHAR(2) Sequence number INT (11) author author_no CHAR(2) last VARCHAR(60) first VARCHAR(60) Indexes Indexes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
