For best success on the assignment read over the problems listed below, return to the textbook, and make sure you have practiced these concepts and then, utilize
https://www.w3schools.com/sql/sql_intro.asp where you will see the topics listed on the left (as well as specifically
listed in the to do list in Blackboard) for additional dynamic practice. I also recommend taking a look at the quizzes (if you have not already) where many of the questions address common syntax and MySQL Workbench errors and checking Instructor Tutorials where I have posted additional notes, examples, and videos for chapters 6 and 7.
Complete the following naming your png files Assignment3No1 etc.:
- Additional practice editing and loading a database script: edit the Guitar database script (located in the assignment link) to include your name. For example,
DROP DATABASE IF EXISTS YourName_guitar_shop;
CREATE DATABASE YourName _guitar_shop;
USE YourName _guitar_shop;
Once edited, open the file in MySQL Workbench, run the script and refresh your schema window. Take a screenshot of your new database and name the file Assignment3No1.png. Upload to your assignment folder in GitHub. Here is an example:
- Write a SELECT statement that returns these columns:
- The count of the number of orders in the orders table
- The sum of the Ship Value which is the sum of the ship_amount from the orders table.
- Submit a screenshot of your result (code and output) named Assignment2No2. Also submit your script also named Assignment2No2.
- Write a SELECT statement that returns one row for each category that has products (inner join) with these columns:
- The Category Name column from the Categories table
- The count of the products in the Products table (join these two tables)
- The price of the most expensive product in the Products table
- Sort the result set so the category with the most products appears first.
- Submit as in the previous task and for all remaining tasks until the discussions at the end.
- Write a SELECT statement that answers this question: What is the total quantity purchased for each product within each category? Return these columns:
- The CategoryName column from the category table
- The ProductName column from the products table
- The total quantity purchased for each product with orders in the OrderDetails table
- Use the WITH ROLLUP operator to include rows that give a summary for each category name as well as a row that gives the grand total. Use the IF and GROUPING functions to replace null values in the category_name and product_name columns with literal values if theyre for summary rows.
- Write a SELECT statement that returns the same result set as this SELECT statement, but dont use a join. Instead, use a subquery in a WHERE clause that uses the IN keyword.
SELECT DISTINCT category_name
FROM categories c JOIN products p
ON c.category_id = p.category_id
ORDER BY category_name
- (10 points) Write a SELECT statement that returns three columns: email_address, order_id, and the order total for each customer. To do this, you can group the result set by the email_address and order_id columns. In addition, you must calculate the order total from the columns in the Order_Items table.
- In MySQL Workbench, select the Administration tab on the lower left and then select Status and System Variables item from the Navigator window. Next, select Commands/DDL (under the Status Variables tab) to view the server variables.
- Explain the following in the text submission box: What variable(s) currently have a value and why?
- Next, select Commands/General and explain the values greater than zero that you see. You may need to do a bit of additional research.
- View the system variables named general_log and general_log_file. Make a note of the values of these system variables and explain what they mean in the text submission box.
- What is the difference between status and system variables? This discussion is flexible. You can compare variables, give some examples etc. Here is an additional resource that my be helpful: https://dev.mysql.com/doc/workbench/en/wbmysqlconnectionsnavigatormanagementstatushtml.
- Please number your discussions (7, 8, 9) in the assignment link text submission box for clarity and, let me know if you have questions.

![[Solved] IT2351 Assignment3](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] IT2351 Assignment4](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.