Write a select statement that returns these columns from


SQL Assignment

In these exercises, you'll enter and run your own SELECT statements. You will use the MyGuitarShop database for these queries. If you do not already have the MyGuitarShop database, the SQL script and the instructions for creating the database are located in the Submitting Assignments module on Canvas.

Create a SQL script that will produce the requested information outlined below. After you have completed and tested the script, submit the script using the HW4 assignment link located in the Week 9 module. Include a comment at the top of the script with your name and assignment.

Also include a comment before each section of the script that identifies the exercise number. Here is an example of how the script should begin:

-- Sherry Albright (SQL Assignment)

-- Exercise 1

1. Write a SELECT statement that returns these columns from the Products table:
The ListPrice column
A column that uses the CAST function to return the ListPrice column with 1 digit to the right of the decimal point
A column that uses the CONVERT function to return the ListPrice column as an integer
A column that uses the CAST function to return the ListPrice column as an integer

2. Write a SELECT statement that returns these columns from the Products table:
The DateAdded column
A column that uses the CAST function to return the DateAdded column with its date only (year, month, and day)
A column that uses the CAST function to return the DateAdded column with its full time only (hour, minutes, seconds, and milliseconds)
A column that uses the CAST function to return the DateAdded column with just the month and day

3. Write a SELECT statement that returns these columns from the Products table:
The ListPrice column
The DiscountPercent column
A column named DiscountAmount that uses the previous two columns to calculate the discount amount and uses the ROUND function to round the result to 2 decimal places

4. Write a SELECT statement that returns these columns from the Orders table:
The OrderDate column
A column that returns the four-digit year that's stored in the OrderDate column
A column that returns only the day of the month that's stored in the OrderDate column.
A column that returns the result from adding thirty days to the OrderDate column.

Request for Solution File

Ask an Expert for Answer!!
Database Management System: Write a select statement that returns these columns from
Reference No:- TGS02929330

Expected delivery within 24 Hours