n the following exercises, you will use the data in the TAL Distributors database shown in Figure 2-1 in Chapter 2. (If you use a computer to complete these exercises, use a copy of the original TAL Distributors database so you will still have the original data when you complete Chapter 4.) In each step, use SQL to obtain the desired results. You can use a DBMS to complete the exercises using a computer, or you can simply write the SQL command to complete each step. Check with your instructor if you are uncertain about which approach to take.
1. List the number and name of all customers.
2. List the complete Item table.
3. List the number and name of every customer represented by rep 15.
4. List the number and name of all customers that are represented by rep 15 and that have credit limits of $10,000.
5. List the number and name of all customers that are represented by rep 15 or that have credit limits of $10,000.
6. For each order, list the order number, order date, number of the customer that placed the order, and name of the customer that placed the order.
7. List the number and name of all customers represented by Megan Gradey.
8. How many customers have a credit limit of $15,000?
9. Find the total of the balances for all customers represented by rep 30.
10. Give the item number, description, and on-hand value (OnHand * Price) for each item in category GME.
11. List all columns and all rows in the Item table. Sort the results by Item description.
12. List all columns and all rows in the Item table. Sort the results by item number within category.
13. List the category and the sum of the number of items on hand. Group the results by category, and order the records by category.
14. Create a new table named Toy to contain the columns ItemNum, Description, OnHand, and Price for all rows on which the category is TOY.
15. In the Toy table, change the description of item DL51 to €œClassic Train Set.€
16. In the Toy table, delete every row on which the price is greater than $120.
17. There are two ways to create the query in Step 12. Write the SQL command that you used and then write the alternate command that also would obtain the correct result.
18. How would you modify the query in Step 6 to limit retrieval to only orders that were placed on 10/15/2015?
Figure 2-1