problems

advertisement
MIS 5612: Assignment 3
Fall 2015
Due by: October 2 (Friday)
Using the Pine Valley Furniture Company database that you have created, please write SQL
queries for the following and run them in the SQL Server. You can save each query as a “stored
procedure” (PROC) … number them Assign3_Q1, Assign3_Q2 etc.
1. List each state where computer desks have been sold along with the number of desks sold
in each state.
2. List the state where the most number of computer desks have been sold.
3. List those cities where customers have bought products with a “Natural” finish.
4. List all customers who have placed more than one order.
5. List all cities (along with states) where end tables have been sold, including the total sold
in each city.
6. List the total sales for each product line.
7. List the total sales for each product by product finish.
8. List the total number of sales for each finish by state. Order by finish and state.
9. Which product finishes have never been ordered? – Use a sub-query
10. Which product finishes have never been ordered? – Use Join
Note: Don’t worry if no records show up for any query.
Download