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

just need the SQL commands for each question. AUTHOR Column Length Decimal Nulls

ID: 3917198 • Letter: J

Question

just need the SQL commands for each question.

AUTHOR Column Length Decimal Nulls Author number (primary key) Author last name Author first name AUTHOR_NUM DECIMAL 2 No AUTHOR_LAST CHAR 12 AUTHOR_FIRST CHAR 10 BOOK Nulls BOOK_CODE CHAR No TITLE PUBLISHER CODE CHAR TYPE PRICE PAPERBACK Book code (primary key) Book title Publisher code Book type Book price Paperback (Y, N) CHAR 3 CHAR DECIMAL 4 CHAR 3 WROTE Column Length Decimal Nulls Description BOOK_CODE CHAR No Book code (primary key) Author number (primary key) Sequence number AUTHOR_NUM DECIMAL 2 No SEQUENCE DECIMAL 1 INVENTORY Nulls places BOOK_CODE CHAR No Book code (primary key) DECIMAL 2 No Branch number (primary key) BRANCH NUM ON HAND DECIMAL 2 Units on hand FIGURE 3-28 Table layouts for the Henry Books database (continued)

Explanation / Answer

1. SQL command to list the book code and title of each book is given below:

SELECT BOOK_CODE, TITLE FROM BOOK;

2. SQL command for complete Publisher table is:

SELECT * FROM PUBLISHER

3. SQL command to list the name of each publisher located in BOSTON:

SELECT PUBLISHER_NAME FROM PUBLISHER where city="BOSTON";

4.SQL command to list the name of each publisher not located in BOSTON:

SELECT PUBLISHER_NAME FROM PUBLISHER where city!="BOSTON";

5.SQL command to list the Name of each branch that has atleast nine employees:

SELECT Branch_name FROM branch where num_employees >=9;