CIS 336 STUDY Career Begins/cis336study.com CIS 336 STUDY Career Begins/cis336study.com | Page 26

4.(TCO8)InusinggroupfunctionswecannotplaceagroupfunctioninaWHEREclause.ExplainhowtheWHEREclauseandHAVINGclausearesimilarandwhyyoucanusetheHAVINGwithagroupfunctionbutnotaWHEREclause.(Points:15)
5.(TCO6)WritetheSQLstatementthatwillremovethedatabasetableEMPLOYEE.(Points:15)
1.(TCO7)WriteajoinqueryusingNATURALJOINthatforeveryorderintheORDERStablewilllisttheordernumberandorderdatealongwiththecusnumber,lastname,andfirstnameofthecustomerwhoplacedtheorder.
2.(TCO8)Writeaquerythatwilllistthepartnumber,partdescription,andon-handvalue(unitsonhand*unitprice)foreachpartinitemclassAP.Givetheexpressionanaliasof"OnHandValue".
3.(TCO8)Writeasubquerythatwilllistthepartnumber,partdescription,andunitsonhandofallpartswherethenumberofunitsonhandisgreaterthantheaverageofunitsonhandforallparts.
4.(TCO7)UsingtheBETWEENoperator,writeaquerythatwilllistalldetailsaboutallordersthatwereplacedduringtheperiodofSeptember3rdthruSeptember5thof1998.

4.(TCO8)InusinggroupfunctionswecannotplaceagroupfunctioninaWHEREclause.ExplainhowtheWHEREclauseandHAVINGclausearesimilarandwhyyoucanusetheHAVINGwithagroupfunctionbutnotaWHEREclause.(Points:15)

5.(TCO6)WritetheSQLstatementthatwillremovethedatabasetableEMPLOYEE.(Points:15)

1.(TCO7)WriteajoinqueryusingNATURALJOINthatforeveryorderintheORDERStablewilllisttheordernumberandorderdatealongwiththecusnumber,lastname,andfirstnameofthecustomerwhoplacedtheorder.

2.(TCO8)Writeaquerythatwilllistthepartnumber,partdescription,andon-handvalue(unitsonhand*unitprice)foreachpartinitemclassAP.Givetheexpressionanaliasof"OnHandValue".

3.(TCO8)Writeasubquerythatwilllistthepartnumber,partdescription,andunitsonhandofallpartswherethenumberofunitsonhandisgreaterthantheaverageofunitsonhandforallparts.

4.(TCO7)UsingtheBETWEENoperator,writeaquerythatwilllistalldetailsaboutallordersthatwereplacedduringtheperiodofSeptember3rdthruSeptember5thof1998.