Ellen wants to know how many copies of each book were sold. Write a SQL statement to
Question:
Use the following information:
Ellen Novotny started an online bookstore in 2017. You are Ellens best friend and promised to help her. Ellen asked you to create a small database to track the information on books and authors. You created the following tables: Author, Book, and Author_Book. The table Author_ Book is a relationship table to link the Author table and Book table because of the many-to-many relationship between the two tables. That is, each author may write many books and each book may have multiple authors. In general, each customer can purchase many books in a single transaction. Also, copies of the same book can be sold to different customers. Once an order is processed, the books are shipped right away. Based on these tables you have (see below), help Ellen to extract the information she needs from the database.
Author
Book
Author_Book
Author ID _________ Book ID
AU-1 ............................. B-2
AU-1 ............................. B-5
AU-2 ............................. B-6
AU-3 ............................. B-2
AU-3 ............................. B-3
AU-4 ............................. B-2
AU-5 ............................. B-4
AU-6 ............................. B-1
AU-6 ............................. B-6
Customer
Sales_Line_Item
Step by Step Answer:
Accounting Information Systems
ISBN: 978-1260153156
2nd edition
Authors: Vernon Richardson, Chengyee Chang, Rod Smith