Reference no: EM133127158
Assignment Details: Please use scripts below
Question 1: Using MySQL, create an ERD to show the tables and relationships of the sales_co schema.
Question 2. Write a query to display the number of rows in the line table.
Question 3. Write a query to show everything in the product table. Add a field called "AssetsTM to calculate quantity * price, order by this field from highest to lowest.
Question 4. Write a query to determine which product has the highest number of units sold.
Question 5. Using the product table, write a query to show the top 4 products that are closest to their reorder point.
Question 6. Using the product and vendor tables, write a query that shows the vendor along with information about the product they sell.
Question 7. Using the query from #6, change your query to find any products without a vendor.
Question 8. Using the customer and invoice tables, write a query to show the customer id, first name, last name, and number of purchases the customer made. Rename the last field ˜OrdersTM.
Question 9. Using the query from #8, add the line table and add the following fields to your query: number of invoice lines (renamed to OrderItems), total units sold (renamed to UnitsSold). Hint "Orders and OrderLines should be different numbers for some customers!
Bonus: 5 extra credit points if you display the correct value for units * price (renamed to SaleAmountTM). Double-check your work by querying the data to confirm your results.
Attachment:- scripts.rar