Answered step by step
Verified Expert Solution
Question
1 Approved Answer
As asked for, here is the database file. http://www.mediafire.com/file/bri79jsrn3t8o5g/CreateMyGuitarShop%25281%2529.sql/file 1. Download MyGuitarShop.sql script from Canvas>Assignments>Assignment #1 and save it in your computer. Start SQL Server
As asked for, here is the database file. http://www.mediafire.com/file/bri79jsrn3t8o5g/CreateMyGuitarShop%25281%2529.sql/file
1. Download MyGuitarShop.sql script from Canvas>Assignments>Assignment #1 and save it in your computer. Start SQL Server Management Studio and open the script file there. Now, execute the entire script. When you do, the Messages tab indicates whether the script executed successfully. Next, navigate through the database objects in the Object Explorer window and make sure you see the newly created database MyGuiterShop there. Now, get familiar with the tables of this database. Next, write SQL statements to answer the following questions: a. Write a SELECT statement that returns four columns from the Customers table in the following order: FirstName, LastName, EmailAddress, and Password. Now, sort the result set by LastName in descending sequence. (5 points) b. Write a SELECT statement that returns the following columns and data from the Products table: (make sure the column names in your result set are the names mentioned under Column name to display in the result") (15 points) Actual column name in the table Column name to display in the result ProductName The ProductName column ListPrice The ListPrice column Date Added The Date Added column Create a new calculated column with the SELECT statement as well and return the calculated column along with three columns mentioned above. The calculated column would be: Discount Amount" with the formula (ListPrice * DiscountPercent). Sort the result set in descending sequence by the Date Added column. c. Now, modify your query above (b.) so that it shows only the 7th and 8th rows of the results. (5 points) d. Write a SELECT statement that returns only one column named Address of Customers from Addresses table that joins the Linel, Line2, City, State, and ZipCode fields with a comma in between. Show only the top 20 results. (10 points)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started