Answered step by step
Verified Expert Solution
Question
1 Approved Answer
LUJOOL IILUU PUUUU11UUTUUU UUTUU You will need to write SELECT commands to answer the following questions. Print the SELECT command and your results using PHPMyAdmin.
LUJOOL IILUU PUUUU11UUTUUU UUTUU You will need to write SELECT commands to answer the following questions. Print the SELECT command and your results using PHPMyAdmin. You will use the same tables that you used in Project 2 (Alpine Adventures). 1. List the inventory items that are the same color as inventory item 23. Display the Inventory ID and color (You must use a subquery in this query. You cannot hard-code the color.) 2. List the inventory items that have an average price greater than the average price of all the inventory items. Display the Inventory ID, and the Price (You must use a subquery in this query) 3. Select the following for each inventory item: Inventory ID, Item Description, item size, color, and Price 4. Select all orders and the names of the customers who placed the orders. Display Order JR, Order Date and the Customer Name 5. Display orders that contain the item Men's Expedition Parka. Display Order ID, Order Date 6. List the items ordered for Order Id 6. Display Inventory ID, Extended Price and Qty 7. Display the in-stock quantity for each item. Display Item ID and Number of items (Order the list by the Item Id in ascending order. This query requires a GROUP BY clause) 8. List the quantity of each inventory item sold. Display Inventory ID and Number Sold. (Order the list by the number of items sold in descending order. This query requires a GROUP BY clause and the SUM function.) 9. Determine the order total (dollar amount) for each order and the customer who placed the order. Display the Order ID, Customer Name and the Order Total. 10. Display all of the inventory information for inv.ids that do not have shipping records. 11. Display all of the inventory information and backorder information for invids that are on backorder 12. Display the customer first and last name and order total for order number 5 13. Display the inv.id, description, price and color of the least expensive inventory item that we have in the inventory table. Use the join keyword to join the inventory table and item table. You need a subquery to determine the least expensive price then use an outer query to find all inventory items at that price. 14. Display the first name, last name, email address and order total for customers that have placed an order at Alpine Adventures. 15. Modify the above query to display ALL customers, whether they have placed an order or not. LUJOOL IILUU PUUUU11UUTUUU UUTUU You will need to write SELECT commands to answer the following questions. Print the SELECT command and your results using PHPMyAdmin. You will use the same tables that you used in Project 2 (Alpine Adventures). 1. List the inventory items that are the same color as inventory item 23. Display the Inventory ID and color (You must use a subquery in this query. You cannot hard-code the color.) 2. List the inventory items that have an average price greater than the average price of all the inventory items. Display the Inventory ID, and the Price (You must use a subquery in this query) 3. Select the following for each inventory item: Inventory ID, Item Description, item size, color, and Price 4. Select all orders and the names of the customers who placed the orders. Display Order JR, Order Date and the Customer Name 5. Display orders that contain the item Men's Expedition Parka. Display Order ID, Order Date 6. List the items ordered for Order Id 6. Display Inventory ID, Extended Price and Qty 7. Display the in-stock quantity for each item. Display Item ID and Number of items (Order the list by the Item Id in ascending order. This query requires a GROUP BY clause) 8. List the quantity of each inventory item sold. Display Inventory ID and Number Sold. (Order the list by the number of items sold in descending order. This query requires a GROUP BY clause and the SUM function.) 9. Determine the order total (dollar amount) for each order and the customer who placed the order. Display the Order ID, Customer Name and the Order Total. 10. Display all of the inventory information for inv.ids that do not have shipping records. 11. Display all of the inventory information and backorder information for invids that are on backorder 12. Display the customer first and last name and order total for order number 5 13. Display the inv.id, description, price and color of the least expensive inventory item that we have in the inventory table. Use the join keyword to join the inventory table and item table. You need a subquery to determine the least expensive price then use an outer query to find all inventory items at that price. 14. Display the first name, last name, email address and order total for customers that have placed an order at Alpine Adventures. 15. Modify the above query to display ALL customers, whether they have placed an order or not
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started