Our Services

Get 15% Discount on your First Order

[rank_math_breadcrumb]

SQL Help13

Statements and query

For the final project, you will be working with a Guitar Shop.  You will need the MySQL server and MySQL workbench installed, just as it has been throughout the class. You will also need the following file:

Project Requirements:

1. Execute the attached create_my_guitar_shop.sql to create the database you will use for this project.

2. Write an SQL script that does the following and save this script as CIS276DA_FinalExercise2_JAM2334209.sql . Save the output of this script as CIS276DA_FinalExercise2_ JAM2334209csv

· Display the product name, list price, discount_percent, discount_amount, and discount_price of all products from the Products Table, ordered by the product name.

· The discount amount can be calculated from the discount percent and the list price.  Round this to 2 decimal places.

· The discount price can be calculated from the discount amount, the discount percent, and the list price.  Round this to 2 decimal place.

· Sort the results from highest to lowest price and only show the 5 highest priced products in the results.

3. Write an SQL script that does the following and save this script as CIS276DA_FinalExercise3_ JAM2334209.sql . Save the output of this script as CIS276DA_FinalExercise3_ JAM2334209.csv

· Display the customers name, from the Customers table, as lastname, firstname separated by a comma and a space.  (Ex.  Doe, John).  Sort the results by last name alphabetically, but only return the names that begin with the letters M through Z.

4. Write an SQL script that does the following and save this script as CIS276DA_FinalExercise4_ JAM2334209.sql . Save the output of this script as CIS276DA_FinalExercise4_ JAM2334209.csv

· Display the lastname, firstname, orderdate, productname, itemprice, discountamount, and quantity as one result set from the Customers, Orders, Order_Items, and Products tables, using aliases for the tables. Sort the results by the last name, order date, and product name, in that order.

5. Write an SQL script that does the following. 

· Add the following product to the Products table:

· product_id: The next automatically generated ID

· category_id: 4

· product_code: dgx_640

· product_name: Yamaha DGX 640 88-Key Digital Piano

· description: Long description to come.

· list_price: 799.99

· discount_percent: 0

· date_added: Today’s date/time.

· Save this script as CIS276DA_FinalExercise5a_MEID.sql

· Save the output of this script as CIS276DA_FinalExercise5a_MEID.csv

· Update the previous record to change the discount percent to 35% instead of 0

· Save this script as CIS276DA_FinalExercise5b_ JAM2334209.sql

· Save the output of this script as CIS276DA_FinalExercise5b_ JAM2334209.csv

6. Write an SQL script that does the following and save this script as CIS276DA_FinalExercise6_ JAM2334209.sql . Save the output of this script as CIS276DA_FinalExercise6_ JAM2334209.csv

· Your results should display one row for each customer that does the following:

· Display the email address from the Customers table, a count of the number of orders for each customer, and the total amount for each order (HINT:  Don’t forget about the discounts when calculating the total amount for the order!)

· Only show results for customers that have more than 1 order.

· Sort the results in descending order by the sum of the line item amounts.

7. Write an SQL script that does the following and save this script as CIS276DA_FinalExercise7_ JAM2334209.sql . Save the output of this script as CIS276DA_FinalExercise7_ JAM2334209.csv

· Use an aggregate window function to display the order id from the Order_Items table along with the total amount for each order 
item in the Order_Items table. (HINT:  Don’t forget the discount!)

· Also display the total amount for each order

· Use an aggregate window function to get the average item amount for each order and display that as a column in the results.

· Use a named window for the two aggregate functions.

· Sort the results in ascending order by the order_id column

8. Write an SQL script that does the following and save this script as CIS276DA_FinalExercise8_ JAM2334209.sql . Save the output of this script as CIS276DA_FinalExercise8_ JAM2334209.csv

· Use a correlated subquery to return one row per customer, representing the customer’s oldest order (the one with the earliest date). Each row should include these three columns:  email_address, order_id, and order_date.

· Sort the results by the order date and order id columns.

9. Write an SQL script that does the following and save this script as CIS276DA_FinalExercise9_ JAM2334209.sql . Save the output of this script as CIS276DA_FinalExercise9_ JAM2334209.csv

· Write a SELECT statement that uses the analytic functions to get the highest and
lowest sales by product within each category. Return these columns:

· The category_name column from the Categories table

· The product_name column from the Products table

· A column named total_sales that shows the sum of the sales for each
product with sales in the Order_Items table

· A column named highest_sales that uses the FIRST_VALUE function to
show the name of the product with the highest sales within each category

· A column named lowest_sales that uses the LAST_VALUE function to
show the name of the product with the lowest sales within each category

10. Write an SQL script that does the following and save this script as CIS276DA_FinalExercise10_ JAM2334209.sql . Save the output of this script as CIS276DA_FinalExercise10_ JAM2334209.csv

· add three new columns to the Products table

· Add one column for the name of the product supplier 

· Add one column for the product markup percentage that provides for three digits to the left of the decimal point and two to the right.  This column should have a default value of 50.00

· Add one column for the date and time that the product was added to the database

· Display the new structure of the table and save that to the csv file.

11. Write an SQL script that does the following and save this script as CIS276DA_FinalExercise11_ JAM2334209.sql . Save the output of this script as CIS276DA_FinalExercise11_ JAM2334209.csv

· Create a view named order_item_products that returns columns from the Orders,
Order_Items, and Products tables.

· This view should return these columns from the Orders table: order_id, order_date,
tax_amount, and ship_date.

· This view should return the product_name column from the Products table.

· This view should return these columns from the Order_Items table: item_price,
discount_amount, final_price (the discount amount subtracted from the item price),
quantity, and item_total (the calculated total for the item).

12. Write an SQL script that does the following and save this script as CIS276DA_FinalExercise12_ JAM2334209.sql . Save the output of this script as CIS276DA_FinalExercise12_ JAM2334209.csv

· Write and execute a script that creates a user with a username and password of yourchoosing. This user should be able to connect to MySQL from any computer. This user should have SELECT, INSERT, UPDATE, and DELETE privileges for the Customers, Addresses, Orders, and Order_Items tables of the My Guitar Shop database. However, this user should only have SELECT privileges for the Products and Categories tables. Also, this user should not have the right to grant privileges to other users.

· Check the privileges for the user by using the SHOW GRANTS statement

Project Submission

1. Place all your script files (12) and CSV files (12) in a folder labeled “Final Project”.

2. Replace “MEID” in the file names with your actual MEID.

3. Zip the entire “Final Project” folder as described in the Syllabus.

4. Submit the zipped assignment folder using the link below.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Asign 2 of CG

Follow the attached instructions to complete this work. Guidance to follow I encourage you to build your project format following the requirements established in each project’s final step. I am going to give you the key to success. I am a fan of headings/subheadings in the final project that directly

Assign 2 of CG

Follow the attach information to complete this work. Make sure it aligns with the Rubric. Unit 2 Assignment Directions: Risk-Assessment Strategy Purpose In this assignment, you will detail the risk-assessment plan and strategy for your organization that you described in your discussion post. You have demonstrated that you understand their

How to Bulk Open MBOX File Windows and Mac?

The best way to bulk open MBOX file Windows and Mac without using any email client is through an expert solution such as BitRecover MBOX Viewer. It runs on both OS and is completely free of cost. The best thing is it is easy to use, has multiple selection modes,

Data unit 2 assign

Follow the attach instructions to complete this work State State Bird State Motto Year of Admission Alaska Willow ptarmigan North to the Future 1959 Texas Northern mockingbird Friendship 1845 California California quail Eureka 1850 Montana Western meadowlark Oro y Plata 1889 New Mexico Greater roadrunner Crescit Eundo 1912 Arizona Cactus

Finding …. Theme

Follow the attached instructions to complete this work. Unit 2 Assignment: Finding themes using a Page 1 dashboard Milligan Chapters 7, 8, and 11 Unit 2 Assignment: Finding themes using a dashboard Milligan Chapters 7, 8, and 11 In this assignment, you will learn how to combine individual visualizations to

Data V of D3

Follow the attach instructions to complete this work Deconstruction of an Advanced Dashboard: Trends and Improvements   Discussion Prompts · Does the dashboard designer use any of the trends that are described in Milligan’s Chapter 9? · If they did use those trends, state which one(s), and describe what they

DV D2

Follow the attached instructions to complete this work also find the previous work attach to it.  Deconstructions of an Advanced Dashboard: Dashboard Approach and Storytelling   Task There is a discussion you will need to participate in this unit. Select the button that follows to access the discussion thread.  You

CG 5

Follow the attached instructions to complete this work. In Unit 1, you analyzed the NIST 2.0 Framework and then compared it to the administration’s approach to cybersecurity. In Unit 2, you will look more specifically at what it means to establish a risk-assessment approach for an organization and how that

Computer Science Digital Image Analysis Assignment

Can anyone create me any one from the assignment doc 1. Real-Time Image Super-Resolution for Video Streams · Description: Develop a system to enhance the resolution of low-quality video streams in real-time using Super-Resolution GANs (SRGAN) or ESRGAN. · Challenge: Ensure temporal consistency across frames, avoid artifacts, and maintain real-time

D1 of data

Follow the attached instructions to complete this work in an hour. Unit 1 Discussion: Deconstruction of an Advanced Dashboard: Identification of Purpose and Visualizations   Task 1. Go to  Viz of the Day 2. This website is hosted by Tableau Public, and new visualizations are posted daily. 3. Select one

D1 of Cg

Follow the attached instruction to complete this discussion Directions 1. Initial post: Respecting user privacy and ensuring data integrity are important ethical requirements of a CISO. They are requirements reflected in the internal governance approach to writing policies on how to manage access and control over data. You may add

Cyber 1

Follow the attach instructions to complete this work. Make sure it Aligns with Rubric. Unit 1 Assignment Directions: Administration Approach to Cybersecurity Purpose Write a 5-page paper analyzing 2023’s  National Cybersecurity Strategy Implementation Plan (NCSIP), which supports the NCS 2023, the Biden Administration’s approach to cybersecurity. Keep in mind that NIST

How to Convert OST files to PST?

Convert OST to PST using Shoviv OST to PST Converter (in steps): · Install and open OST to PST Converter tool · Add OST files you want to convert · Choose PST as the saving format · Select destination folder · Click Export to start conversion The tool converts OST

GainTools MBOX to PST Converter

GainTools MBOX to PST Converter is a powerful and easy-to-use program that can change MBOX files into PST files with 100% accuracy. It can convert several MBOX files at once, keeps the layout and attachments of the emails, and works with all major MBOX email clients. This makes it quick,

windowslivemailconverter

 <!–td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}–> The best choice for the users is eSoftTools Windows Live Mail Converter software. It allows the users to convert their Live Mail profile emails into multiple formats as well as export Windows Live Mail emails to 8+ conversion and different cloud mail apps. It

Final CIS Project

 Scenario: A robot is sitting in a chair with its arms facing down. Write an algorithm, using pseudocode, to make the robot: 

What features define a successful AI Chatbot Development Company?

A successful AI Chatbot Development Company is defined by its ability to deliver intelligent, scalable, and user-friendly chatbot solutions powered by advanced AI and NLP. Key features include seamless integration, contextual conversation handling, real-time analytics, and enterprise-grade security—essential for enhancing customer support, boosting engagement, and automating workflows across diverse business

Instructions listed below

It’s an online assignment, I’ll give you the login and the names of the assignments, and you complete them.