SuperTutor

(15)

$15/per page/Negotiable

About SuperTutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Business & Finance See all
Accounting,Business & Finance,Economics,Engineering,HR Management,Math Hide all
Teaching Since: Apr 2017
Last Sign in: 327 Weeks Ago, 5 Days Ago
Questions Answered: 12843
Tutorials Posted: 12834

Education

  • MBA, Ph.D in Management
    Harvard university
    Feb-1997 - Aug-2003

Experience

  • Professor
    Strayer University
    Jan-2007 - Present

Category > Programming Posted 18 May 2017 My Price 9.00

practice writing CASE, SET, and DECLARE statements

How to create four queries with CASE, SET, and Declare logic using SQL AdventureWorks2014 database.

 

I wrote the following IF THEN statement, which has a syntax error.

 

USE AdventureWorks2014

 SELECT CASE if TotalCount >10 THEN 'TRUE' ELSE 'FALSE' END FROM

(

SELECT Style, COUNT(*) TotalCount

FROM Production.Product

)

 

practice writing CASE, SET, and DECLARE statements.The marketing department wants to promote sales of the Road-650 bicycle. It hasdeveloped a request list related to the promotion, and you have been tasked withdetermining questions related to the Road-650 bicycle inventory.1.The marketing department wants to know if the Road-650 bicycle has more than 10styles currently available. Using the Product table, create a statement using IFTHEN logic to trigger on whether there are more or less than 10 of Road-650bicycle units available. Submit the statement and the result of the query.2.The marketing department has decided that it will only feature black colored Road-650 bicycles in the sales promotion. However, the marketing department may wantto modify the sale at a later date. Use a DECLARE and SET statement to pre-set avariable color to "Black." Using the variable, run a query to show all the type ofbicycles including all ±elds.3.Building on the question 2 activity, add the "Quantity" and "ListPrice." Filter theresults to only items in "Finished Goods Storage."4.Building on the question 3 activity, the marketing department has decided that anyproducts that currently have more than 100 units in stock will be discounted by10%. All other products will have a 5% discount as part of the promotion. Create aCASE statement that modi±es the "ListPrice" into a new ±eld called "SalesPrice."

Answers

(15)
Status NEW Posted 18 May 2017 12:05 AM My Price 9.00

-----------

Attachments

file 1495066924-Solutions file 2.docx preview (50 words )
S-----------olu-----------tio-----------ns -----------fil-----------e -----------Hel-----------lo -----------Sir-----------/Ma-----------dam----------- T-----------han-----------k y-----------ou -----------for----------- yo-----------ur -----------int-----------ere-----------st -----------and----------- bu-----------yin-----------g m-----------y p-----------ost-----------ed -----------sol-----------uti-----------on.----------- Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m o-----------nli-----------ne -----------or -----------inb-----------ox -----------me -----------a m-----------ess-----------age----------- I -----------wil-----------l b-----------e q-----------uic-----------kly----------- on-----------lin-----------e a-----------nd -----------giv-----------e y-----------ou -----------exa-----------ct -----------fil-----------e a-----------nd -----------the----------- sa-----------me -----------fil-----------e i-----------s a-----------lso----------- se-----------nt -----------to -----------you-----------r e-----------mai-----------l t-----------hat----------- is----------- re-----------gis-----------ter-----------ed -----------onÂ----------- so-----------bte-----------ll.-----------com-----------Tha-----------nk -----------you----------- S-----------upe-----------rTu-----------tor-----------
Not Rated(0)