Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

Question What are the requirements for a SIMPLE 401(k) plan?

Answered: 1 week ago