Question: Database: My Guitar Shop (MGS) DatabaseSave your solution to XXA01.sql. Install the MGS database: G:mysqlmgs_ex_startscreate_my_guitar_shop.sql. You must have completed Lab 2.Q1. MGS Exercise 1 [3points]Write
Database: My Guitar Shop (MGS) DatabaseSave your solution to XXA01.sql. Install the MGS database: G:\mysql\mgs_ex_starts\create_my_guitar_shop.sql. You must have completed Lab 2.Q1. MGS Exercise 1 [3points]Write a SELECT statement that returns everything in the tablecustomers.
Add an ORDER BY clause to this statementthat sorts the result set by first_namein descending sequence.Q2. MGS Exercise 2[4points]Write a SELECT statement that returns these columns from the Products table: product_name,list_price, and date_added. Return only the rows with a list price that is greater than 500 andless than 2000. Sort the result set in ascending sequence by the date_added column.Q3. MGS Exercise 3[5 points]Write a SELECT statement that returns these columnsfrom the Order_Items table:item_id, item_price, discount_amount, quantity, price_total (i.e., multiply the item price by thequantity), discount_total (i.e., multiply the discount amount by the quantity), item_total (i.e.,subtract the discount amount from the item price and then multiply by the quantity). Onlyreturn rows where the item_total is greater than 600. Sort the result set by price_total indescending sequence.Q4. MGS Exercise 4[4points]Write a SELECT statement that returns these columns from the Productstable:product_name,category_id, list_priceand date_added.Return only the rows where the category_idcolumn contains 2 or 3. Include only the rows where the date_added is after 2015-07-01
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
