SQL-assignment

advertisement
SQL Lab and Homework Assignment
Create the following queries in the SQL Window of Microsoft Access.
Save each query using the name Query-n, where n is the number query.
Save the database, and upload to blackboard.
Alternatively, you may cut and paste the text of each query (clearly numbered) into a Word
document, and upload the Word document to blackboard.
1. List the price, product name, and product ID for all products in the Product table.
2. Which products have a standard price of less than $275? Include the
ProductDescription and the ProductStandardPrice.
3. What is the address of the customer named Home Furnishings? Use an alias, “Name”
for the CustomerName, and use an alias “Address” for CustomerAddress.
4. What are the standard price, and the standard price if increased by 10 percent, for every
product?
5. What is the average standard price of all the products in the Product table?
6. Alphabetically, what is the first product name in the Product table?
7. Which orders have been placed since 10/24/2010?
8. What furniture does Pine Valley carry that isn’t made of cherry?
9. List the product description, finish and standard price for all desks and tables that cost
more than $300 in the Product table.
10. List all Customers, alphabetically by state, and then alphabetically by customer name
within each state.
11. How many customers do we have?
12. Count the number of customers in each state.
13. What are the customer IDs and and names of all customers, along with the Order IDs
for all the orders they have placed?
14. For each order, list the orderID, order date and every item (product#) ordered.
15. Same as Query #15, and also list the Product Description.
Download