Devam Ediyor

488261 Write queries for each of the stated problems in the steps b

The deliverable for this lab will include:

Your script file with the 13 queries in it. Be sure your name, course number, and lab number are in a comment area at the top of your file.

An output file created using SET ECHO ON showing both the SQL code and the results.

Both documents are to be zipped into a single file before submitting to the iLab Dropbox for Week 4.

L A B S T E P S

STEP 1:

Using the BOOKS table, write a query that will list the categories for the books in inventory. List each category only once in your result set.

STEP 2:

Using the BOOKS table, write a query that will list the title and publisher ID for each book in the table. Use the column heading of "Publisher ID" for the pubid field.

STEP 3:

Using the BOOKS table, write a query that will list the book title, retail price, and the amount of markup for each book. The amount of markup is the retail price minus the cost. Use the column heading “Price Markup” for the arithmetic expression column.

STEP 4:

Using the BOOK_CUSTOMER table, write a query that will list the customer's first name, last name, and city for those customers living in zip code 31206.

STEP 5:

Using the BOOK_ORDER table, write a query that will list everything about the orders placed prior to April 2, 2009.

STEP 6:

Using the BOOK_ORDER table, write a query that will list everything about the orders that have not been shipped yet.

STEP 7:

Using the BOOK_CUSTOMER table, write a query using the AND and OR operators that will list the customer information for those customers living in either Florida or New Jersey who have not been referred by another customer.

STEP 8:

Using the BOOKS table, write a query that will list all information about those books that are not computer books and do not cost more than $[url removed, login to view] retail.

STEP 9:

Using the AUTHOR table, write a query that will list all information about authors whose first name ends with an “A”. Put the results in descending order of last name, and then ascending order by first name. This should be done using a single query.

STEP 10:

Using the BOOK_ORDER table, write a query using the > and < operators that will list the orders that were placed between April 1, 2009 and April 4, 2009. Only show the orders for April 2nd and 3rd in your result set.

STEP 11:

Using the BOOK_ORDER table, write a query that will list the orders that were placed between April 2, 2009 and April 4, 2009 including those placed on the 2nd and 4th. Use a different approach (operator) in writing this query than used in the query for #10, that is, do not use > and < signs in your query.

STEP 12:

Using the BOOKS table, write a query that will list the book title, publisher ID, and published date for all books that were published by publisher 4 or after January 1, 2001. Order the results in ascending order by publisher ID and give the publish date and publisher ID columns meaningful titles.

STEP 13:

Many organizations use percentage of markup (e.g., profit margin) when analyzing financial data. To determine the percentage of markup for a particular item, simply subtract the cost for the item from the retail price to obtain the dollar amount of profit, and then divide the profit by the cost of the item. The resulting solution is then multiplied by 100 to determine the percent of markup. Using a SELECT statement, display the title of each book and its percent of markup. For the column displaying the percent of markup, use “Markup %” as the column heading.

This is the end of lab #4

Beceriler: Her şey Kabul, Makale Yeniden Yazım

Daha fazlasını görün: writing result table, writing date, writing steps, writing computer code, write computer article, using writing, used write book, top query, top problems, steps writing, step writing article, statement problems, solution problems, operator code, list books author, first lab, everything dollar, cost writing article, books author, books authors, authors books, author article, article writing steps, article different author, anything dollar

İşveren Hakkında:
( 1 değerlendirme )

Proje NO: #2234172