Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL Help, I am new to SQl and trying to solve: For a book with ISBN 9780756404079, display its title, publisher, ISBN, which library (not

SQL Help, I am new to SQl and trying to solve:

For a book with ISBN 9780756404079, display its title, publisher, ISBN, which library (not branch) has it, and total number of copies each library has. Do not show libraries that dont carry it. Sort results by number of copies in decending order.

I tried:

Select Catalog_Item.Title,(select count(*) from book) as Number_of_Copies, Catalog_Item.publisher, Book.isbn, Library_Name

from catalog_Item, Library,book

where catalog_Item.catalog_Item_ID = Book.catalog_Item_ID and book.isbn = 9780756404079

order by Number_of_copies desc;

But it is only listing one book and the libraries that carry it, what do I fix?image text in transcribed

Branch Librery Branch ID NUMBER Library ID: NUMBER Branch Name: VARCHAR2(30) Branch-Phone VARCHAR2(30) te Branch Address: VARCHAR2(30) Library ID. NUMBER (FK) ???????????????????????? VARCHAR2(30 Librer-Name Library Phone: VARCHAR2(30) Library Address: VARCHAR2(30) Physical ltem Transacion Library Card Physical-ltem,ID: NUMBER Transaction-ID NUMBER Library_Card ID: NUMBER Branch ID NUMBER (FK) Catelog_ltem ID: NUMBER (FK) Copy Number NUMBER Date Purchased DATE Library ID: NUMBER (FK) Customer ID: NUMBER (FK) Card_Number VARCHAR2(30) PIN: VARCHAR2(8) Date Expire DATE Date checkout DATE Date Due: DATE Date Returned: DATE 6- Librery_Card_ID: NUMBER (FK) Physical ltem JD: NUMBER (FK) Catalog tenm Catalog-item-IO: NUMBER Customer Customer-iD: NUMBER Title: VARCHAR2(30) Description: VARCHAR2(30) Publisher VARCHAR2(30) Release Date: DATE Type: VARCHAR2(30) Customer Firstname: VARCHAR2(30) Customer Lastname: VARCHAR2(30) Customer Street VARCHAR2(30) Customer City VARCHAR2(30) Customer State: VARCHAR2(20) Customer Zip: VARCHAR2(10) Book DVD Catalog Item ID NUMBER (FK) Lenqth: VARCHAR2(30) Catalog-lternJD: NUMBER (FK) ISBN: VARCHAR213) Paqes: NUMBER

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

Students also viewed these Databases questions

Question

3. What can be done about it?

Answered: 1 week ago

Question

=+Trainers from headquarters? Local trainers? Independent trainers?

Answered: 1 week ago