Question: Q1 Create a report showing ALL data from the ORDERITEMS table. Q2 List the publisher names only from the PUBLISHER table. Q3 List the contact

Q1 Create a report showing ALL data from the ORDERITEMS table.

Q2 List the publisher names only from the PUBLISHER table.

Q3 List the contact name and the phone number for each publisher in the PUBLISHER table. Show column heading for the publisher contacts as "Contact name".

Q4 List ISBN and the title for each book in the BOOKS table, along with the cost and retail price of each book.

Q5 List the ISBN, title, price, cost, and profit for all(each) book.

Q6 List all customers with city and state they live in. Use alias names for the reported column.

The resulting table should have the following headings: Name, Street Address, City, State, Zip Code

Q7 Show the structure of the CUSTOMERS table.

Q8 For JustLee planning purposes, provide a list of all the books with a 5% retail price increase. Show the ISBN, title, current, and increased price.

Q9 Please explain in a paragraph how much profit is generated from orders that were placed in October, November, and December of 2009. Remember to take in consideration that some books are ordered in multiple copies and profit is determined by the difference in the retail price of the book and its cost. Also, some books on orders have a discount.

Q10 How would you find out which books do not have any discount?

Attach and submit your completed assignments in RTF, TXT or SQL format. Please do not include any results from your queries.

ONLY submit the SQL scripts (Questions 1-8) using the following naming convention: HW#_Q#_YourInitials.

For example:

/*HW1_Q1_DV*/

For Q9 and 10 provide a one-paragraph explanation. No SQL query required.

AUTHORID LNAME FNAME
S100 SMITH SAM
J100 JONES JANICE
A100 AUSTIN JAMES
M100 MARTINEZ SHEILA
K100 KZOCHSKY TAMARA
P100 PORTER LISA
A105 ADAMS JUAN
B100 BAKER JACK
P105 PETERSON TINA
W100 WHITE WILLIAM

Table:

BOOKS

Column Data Type Length Precision Scale Nullable
ISBN VARCHAR2 10 - - No
TITLE VARCHAR2 30 - - Yes
PUBDATE DATE 7 - - Yes
PUBID NUMBER 22 2 0 Yes
COST NUMBER 22 5 2 Yes
RETAIL NUMBER 22 5 2 Yes
DISCOUNT NUMBER 22 4 2 Yes
CATEGORY VARCHAR2 12 - - Yes
QOH NUMBER 22 3 0 Yes

Table:

CUSTOMERS

Column Data Type Length Precision Scale Nullable
CUSTOMER# NUMBER 22 4 0 No
LASTNAME VARCHAR2 10 - - No
FIRSTNAME VARCHAR2 10 - - No
EMAIL VARCHAR2 40 - - Yes
ADDRESS VARCHAR2 20 - - Yes
CITY VARCHAR2 12 - - Yes
STATE VARCHAR2 2 - - Yes
ZIP VARCHAR2 5 - - Yes
REFERRED NUMBER 22 4 0 Yes
REGION CHAR 2 - - Yes

Table:

ORDERITEMS

Column Data Type Length Precision Scale Nullable
ORDER# NUMBER 22 4 0 No
ITEM# NUMBER 22 2 0 No
ISBN VARCHAR2 10 - - Yes
QUANTITY NUMBER 22 3 0 No
PAIDEACH NUMBER 22 5 2

No

Table:

ORDERS

Column Data Type Length Precision Scale Nullable
ORDER# NUMBER 22 4 0 No
CUSTOMER# NUMBER 22 4 0 Yes
ORDERDATE DATE 7 - - No
SHIPDATE DATE 7 - - Yes
SHIPSTREET VARCHAR2 18 - - Yes
SHIPCITY VARCHAR2 15 - - Yes
SHIPSTATE VARCHAR2 2 - - Yes
SHIPZIP VARCHAR2 5 - - Yes
SHIPCOST NUMBER 22 4 2 Yes

Table:

PROMOTION

Column Data Type Length Precision Scale Nullable
GIFT VARCHAR2 15 - - Yes
MINRETAIL NUMBER 22 5 2 Yes
MAXRETAIL NUMBER 22 5 2 Yes

Table:

PUBLISHER

Column Data Type Length Precision Scale Nullable
PUBID NUMBER 22 2 0 No
NAME VARCHAR2 23 - - Yes
CONTACT VARCHAR2 15 - - Yes
PHONE VARCHAR2 12 - - Yes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!