Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The marketing department wants to know if the Road - 6 5 0 bicycle has more than 1 0 styles currently available. Using the Product

The marketing department wants to know if the Road-650 bicycle has more than 10 styles currently available. Using the Product table, create a statement using IF THEN logic to trigger on whether there are more or less than 10 of Road-650 bicycle units available. Submit the statement and the result of the query.
The marketing department has decided that it will only feature black colored Road-650 bicycles in the sales promotion. However, the marketing department may want to modify the sale at a later date. Use a DECLARE and SET statement to pre-set a variable color to "Black." Using the variable, run a query to show all the type of bicycles including all fields.
Building on the question two activity, add the "Quantity" and "ListPrice." Filter the results to only items in "Finished Goods Storage."
Building on the question three activity, the marketing department has decided that any products that currently have more than 100 units in stock will be discounted by 10%. All other products will have a 5% discount as part of the promotion. Create a CASE statement that modifies the "ListPrice" into a new field called "SalesPrice."
Your manager has asked you to create a stored procedure for an application the business is developing. For the application, management has requested that when a "City" is selected, it returns with the corresponding region. By integrating code, the business will be able to return results quickly for users. Use the Address, StateProvince, and SalesTerritory tables and name the procedure "GetRegion." TIP: Use GO. Test that your procedure works by running an EXECUTE statement.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

Students also viewed these Databases questions