Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will need to write SELECT commands to answer the following questions. Print the SELECT command and your results using PHPMYAdmin. Your instructor will give

image text in transcribed

You will need to write SELECT commands to answer the following questions. Print the SELECT command and your results using PHPMYAdmin. Your instructor will give show you how to create the tables. The table descriptions start on Page 111 (Alpine Inventory database). 1. Select all the rows from the alp.item table. Display Description and Category 2. Select alo inventory items that have a price of less than 100 dollars. Display Id, Size, Price and Quantity on Hand. 3. List the alp inventory items that have a quantity on hand of more than 30. Display Id, Quantity on Hand and Price 4. List the alp.customers in 'Washburn' and 'Silver Lake'. Display first name, last name, mi and city 5. Select the prices that occur in the alp.inventory table. A specific price should only appear once. Display the Price. 6. Select the alp.inventory items that are in stock. Display Id, Price and Quantity on Hand 7. Select the alp orders placed before November 1, 2007. Display the Order id and Order. date 8. List the alp inventory items that are 'Coral' or 'Olive' and have a Quantity on Hand of less than 105. Display Id and Quantity on Hand 9. List the alp items that contain the word 'Fleece' in the item description. Display Id, Description, and Category 10. List all the alp inventory items that do not have a size or a color assigned. Display the ld and Price. 11. Determine the number of orders placed on 10 October 2007. Display Number of Orders Hint: Use the COUNT function 12. Determine the extended price for each row in the alp.orderline table. Display Order ide invid, and Extended Price 13. Determine the number of different items on each order. Display Order ID and Number of Items Hint: Determine the number of different products ordered, not the total quantity ordered. This query requires a GROUP BY clause. 14. Determine the number of orders placed by each customer. Only display the data for customers who have placed more than one order. Display Cust id and Number of Orders Hint: This query requires a GROUP BY clause and a HAVING clause. 15. Determine the order total for each order that has an order total greater than 100. Display 'Order Id' and 'Order Total'. Make sure the results are in ascending order total sequence. 16. Determine what is the most expensive price, the least expensive price, and the average price in the alp.inventory table. 17. Now that you know the average price in the inventory table, display all of the information for inventory items whose price is greater than the average price. You will need to write SELECT commands to answer the following questions. Print the SELECT command and your results using PHPMYAdmin. Your instructor will give show you how to create the tables. The table descriptions start on Page 111 (Alpine Inventory database). 1. Select all the rows from the alp.item table. Display Description and Category 2. Select alo inventory items that have a price of less than 100 dollars. Display Id, Size, Price and Quantity on Hand. 3. List the alp inventory items that have a quantity on hand of more than 30. Display Id, Quantity on Hand and Price 4. List the alp.customers in 'Washburn' and 'Silver Lake'. Display first name, last name, mi and city 5. Select the prices that occur in the alp.inventory table. A specific price should only appear once. Display the Price. 6. Select the alp.inventory items that are in stock. Display Id, Price and Quantity on Hand 7. Select the alp orders placed before November 1, 2007. Display the Order id and Order. date 8. List the alp inventory items that are 'Coral' or 'Olive' and have a Quantity on Hand of less than 105. Display Id and Quantity on Hand 9. List the alp items that contain the word 'Fleece' in the item description. Display Id, Description, and Category 10. List all the alp inventory items that do not have a size or a color assigned. Display the ld and Price. 11. Determine the number of orders placed on 10 October 2007. Display Number of Orders Hint: Use the COUNT function 12. Determine the extended price for each row in the alp.orderline table. Display Order ide invid, and Extended Price 13. Determine the number of different items on each order. Display Order ID and Number of Items Hint: Determine the number of different products ordered, not the total quantity ordered. This query requires a GROUP BY clause. 14. Determine the number of orders placed by each customer. Only display the data for customers who have placed more than one order. Display Cust id and Number of Orders Hint: This query requires a GROUP BY clause and a HAVING clause. 15. Determine the order total for each order that has an order total greater than 100. Display 'Order Id' and 'Order Total'. Make sure the results are in ascending order total sequence. 16. Determine what is the most expensive price, the least expensive price, and the average price in the alp.inventory table. 17. Now that you know the average price in the inventory table, display all of the information for inventory items whose price is greater than the average price

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

ISBN: 0137916787, 978-0137916788

More Books

Students also viewed these Databases questions