Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I NEED HELP WITH THIS QUESTION FOR MY DATABASE ASSIGNMENT gfoifdsjnfnjfsnjofsojafsdo'dfsp'idfsThe above database schema is for the BOOKSTORE database. Using this schema as a guide,

I NEED HELP WITH THIS QUESTION FOR MY DATABASE ASSIGNMENT

image text in transcribed

gfoifdsjnfnjfsnjofsojafsdo'dfsp'idfsThe above database schema is for the BOOKSTORE database. Using this schema as a guide, please write the SQL statements to do the following:

1) Write the statements to create the tables. Make sure to write appropriate DROP table statements prior to creating the table so that if you run this script multiple times, old tables will be removed first.

2) Write the statements to insert data into each table (dataviews listed below).

3) Write a query to select all of the book titles and category from the BUSINESS or SELF HELP categories.

4) Write a query to select all of the books in the CHILDREN category that have a retail price of less than $20.

5) Write a query to select all of the books that have COOK in their title.

6) Write a query that display the book's title, retail price, cost and profit margin (retail - cost).

7) Write a query that displays all of the books that have a cost of between $10 and $20.

8) Write a query that displays all of the book titles in ascending alphabetical order.

9) Write a query that displays all of the book titles and retail prices listed from most expensive to least expensive.

10) Write a query that will display how many promotional items exist.

11) Write a query that displays the book title and category along with the publisher's name, contact, and phone.

12) Write a query that displays all of the book titles that are in the FAMILY LIFE category along with all of the books from the READING MATERIALS INC. publisher (use UNION).

Turn in a Word or text document (into Blackboard) that contains your statements for each question above.

Table Contents:

BOOKS data image text in transcribed Publisher Data

image text in transcribed

Promotion Data

image text in transcribed \begin{tabular}{|l|l|l|l|l|l|l|} \hline ISBN & TITLE & PUBDATE & PUBID & COST & RETAIL & CATEGORY \\ \hline 1059831198 & BODYEUILD IN 10 MINUTES A DAY & 20100121 & 4 & 18.75 & 30.95 & FITNESS \\ \hline 0401140733 & REVENGE OF MICKEY & 20101214 & 1 & 14.20 & 22.00 & FAMILY LIFE \\ 4981341710 & BUILDING A CAR WITH TOOTHPICKS & 20120318 & 2 & 37.80 & 59.95 & CHILRREN \\ 8843172113 & DATABASE IMFLEMENTATION & 20190604 & 3 & 31.40 & 55.95 & COMPUTER \\ 3437212490 & COOKING WITH MUSHROOMS & 20000228 & 4 & 12.50 & 19.95 & COOKING \\ 3957136468 & HOLY GRAIL OF ORACLE & 20191231 & 3 & 47.25 & 75.95 & COMPUTER \\ 1915762492 & HANDCR.ANKED COMPUTERS & 20200121 & 3 & 21.80 & 25.00 & COMPUTER \\ 9959789321 & E-BUSINESS THE EASY WAY & 20180301 & 2 & 37.90 & 54.50 & COMPUTER \\ 2491748320 & PAINLESS CHILD REARING & 20140717 & 5 & 48.00 & 89.95 & FAMLLY LIFE \\ \hline 0299282519 & THE WOK WAY TO COOK & 20200911 & 4 & 19.00 & 28.75 & COOKING \\ 8117949391 & BIG BEAR AND LITLE DOVE & 20181108 & 5 & 5.32 & 8.95 & CHILDREN \\ 0132149871 & HOW TO GET FASTER PIZZA & 20171102 & 4 & 17.85 & 29.95 & SELF HELP \\ 9247381001 & HOW TO MANAGE THE MANAGER & 20190509 & 1 & 15.40 & 31.95 & BUSINESS \\ \hline 2147428890 & SHORTEST POEMS & 20000501 & 5 & 21.85 & 39.95 & LITERATURE \\ \hline \end{tabular} \begin{tabular}{|l|l|l|} \hline GIFT & MINRETAIL & MAXRETAIL \\ \hline BOOKMARKER & 0 & 12 \\ BOOK LABELS & 12.01 & 25 \\ BOOK COVER & 25.01 & 56 \\ \hline FREE SHIPPING & 56.01 & 999.99 \\ \hline \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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 Accounting questions

Question

What do you mean by dual mode operation?

Answered: 1 week ago

Question

Explain the difference between `==` and `===` in JavaScript.

Answered: 1 week ago