Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Jul 2017 |
Last Sign in: | 271 Weeks Ago, 3 Days Ago |
Questions Answered: | 1850 |
Tutorials Posted: | 1850 |
Graduate in Biology and Nutrition, MBA Finance
Florida State University
Aug-2000 - Jul-2007
Ass. Relationship Manager
Penn-Florida
Mar-2009 - Feb-2016
--Write one or more statements in the given space beneath each problem
--description to answer the query.
--Each SELECT statement is worth 15 points with max possible total of--60 points.
--Partial credits is possible.
--Each clause of SELECT, FROM, WHERE, and ORDER BY is expected to be coded--on its own line and use proper indentation on each line to make your--code more readable for grading.
--Do not include statements other than what are required to avoid extra points--deducted.
--Do not change the file name and its extension.
use [ClearWater]
/* Query 1Write a SELECT-INTO statement to create Products_ch07 table as a duplicate ofProducts table of ClearWater database.
Then, write a DELETE statement to delete products from Products_ch07 if theirunit price is above the average of those in category 1 ~ 5 in Products table.Your output must also display all columns of products that are deleted.*/
/* Query 2After Query 1 is completed, write an INSERT statement to insert productsinto Products_ch07 if they exist in the ClearWater.dbo.Products but notProducts_ch07. Your output should display all columns of products thatare inserted.*/
/* Query 3After Query 1 is completed, write an UPDATE statement with a subqueryto increase product unit price by 10% in Products_ch07 if their supplieris in Japan or Germany. Be sure your output display the following fourcolumns of products that are updated: ProductID, UnitPriceBeforeUpdate,UnitPriceAfterUpdate, UpdatedAmount.*/
/* Query 4After Query 3 is done, write a statement to drop Products_ch07 fromyour database and write a SELECT-INTO statement to re-create it as
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I