Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Questions (1,5,7,8,10,17,18,19,22) The table named WROTE, as shown in Figure 1-7

ID: 3704259 • Letter: Q

Question

Questions (1,5,7,8,10,17,18,19,22)

The table named WROTE, as shown in Figure 1-7, is used to relate books and authors. The SEQUENCE field indicates the order in which the authors of a particular book are listed on the cover. The table named INVENTORY in the same figure is used to indicate the number of copies of a particular book that are currently on hand at a particular branch of Henry Books. The first row, for example, indicates that there are two copies of the book with the code 0180 at branch 1. 01so 0189 0189 1s 0200 0378 079X 079x 0378 079x 1351 1382 1382 138x 2226 25 1331 1331 1382 2766 2226 17 2226 3743 FIGURE 1-7 Sample data that relates books to authors and books to branches for Henry Books

Explanation / Answer

1) List the book code and book title of each book.

select BOOK_CODE, TITLE FROM BOOK;

5) List the name of each branch that has at least 9 employees.

SELECT BRANCH_NAME FROM BRANCH WHERE NUM_EMPLOYEES>=9;

7) List the book code and book title of each book that has SFI and is in paperback.

select BOOK_CODE, TITLE FROM BOOK WHERE TYPE='SFI' AND PAPERBACK='Yes';

8) List the book code and book title of each book that has SFI or is published by the publisher with the publisher code SC.

select BOOK_CODE, TITLE FROM BOOK WHERE TYPE='SFI' OR PUBLISHER_CODE='SC';

10) List the book code and book title of each book that has the type MYS and a price of less than $20.

select BOOK_CODE, TITLE FROM BOOK WHERE TYPE='MYS' AND PRICE < $20;

We need the data type of the column Price to ascertain that how the query should be written to check PRICE < $20.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote