{"id":4176,"date":"2023-02-22T07:16:33","date_gmt":"2023-02-22T07:16:33","guid":{"rendered":"https:\/\/www.goodacademic.com\/blog\/questions\/spring-2023-itm-304-hsf1-managing-data-structures\/"},"modified":"2023-02-22T07:16:33","modified_gmt":"2023-02-22T07:16:33","slug":"spring-2023-itm-304-hsf1-managing-data-structures","status":"publish","type":"questions","link":"https:\/\/www.goodacademic.com\/blog\/questions\/spring-2023-itm-304-hsf1-managing-data-structures\/","title":{"rendered":"Spring 2023 ITM.304.HSF1 Managing Data Structures"},"content":{"rendered":"<div class=\"col-sm-12 messageContent\">\n <b>Learning Goal: <\/b>I&#8217;m working on a mysql exercise and need an explanation and answer to help me learn.<\/p>\n<p>1. Review SQL below. Replacing <span class=\"\" style=\"background-color: initial;\">my<\/span><strong>Table<\/strong> and <strong>Column Names<\/strong><strong>with<\/strong><strong><span class=\"\">Tables and Columns<\/span><\/strong><strong><span class=\"\">Names<\/span><\/strong><span class=\"\" style=\"background-color: initial;\"> in <strong><span class=\"\">YOUR <\/span><\/strong><span class=\"\">Database <span class=\"\">write SQL statement and run it.<\/span><\/span><\/span><\/p>\n<p><strong>Select <\/strong><\/p>\n<p>s.SalesOrderDate, s.SaleOrderID, s.Quantity,<br \/>m.MarketName, r.RegionName ,c.CustomerName, <br \/>p.ProductName, f.ProductFamilyName,<br \/>a.AgentName, mm.ManagerName, mm.Commissions,<br \/>p.UnitPrice * s.Quantity as OrderAmount, <br \/>p.UnitPrice * s.Quantity * mm.PcntCommissions *0.01 as OrderCommissionsAmmount<\/p>\n<p><strong>FROM<\/strong> SalesOrder s, Customer c, Market m, Region r, Product p, ProductFamily f, Agent a, Manager mm<\/p>\n<p><strong>WHERE<\/strong><\/p>\n<p>c.MarketID = m.MarketID and<br \/>c.RegionID = r.RegionID and<br \/>c.CustomerID = s.CustomerID and <br \/>s.ProductID= p.ProductID and<br \/>p.ProductFamilyID = f.ProductFamilyID and<br \/>s.AgentID = a.AgentID and<br \/>a.ManagerID = mm.ManagerID ;<\/p>\n<p><i><span class=\"\">Make sure OrderAmount and CommissionsAmmount <strong><span class=\"\">are calculated<\/span><\/strong><span class=\"\">.<\/span><\/span><\/i><br \/><i><span class=\"\">SQL must return 25 records<\/span><\/i><\/p>\n<p>2. Using SQL statement from question 1<\/p>\n<p>Run :<\/p>\n<p><strong> Create view Week6_sales_vi as <span class=\"\">put your SQL from above here ;<\/span><\/strong><\/p>\n<p><strong> UPLOAD and Submit SQL statement<\/strong> <strong>in PDF<\/strong> if the view returned data(25 records ) <strong>only. <\/strong><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Learning Goal: I&#8217;m working on a mysql exercise and need an explanation and answer to help me learn. 1. Review SQL below. Replacing myTable and Column NameswithTables and ColumnsNames in YOUR Database write SQL statement and run it. Select s.SalesOrderDate, s.SaleOrderID, s.Quantity,m.MarketName, r.RegionName ,c.CustomerName, p.ProductName, f.ProductFamilyName,a.AgentName, mm.ManagerName, mm.Commissions,p.UnitPrice * s.Quantity as OrderAmount, p.UnitPrice * s.Quantity [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":[],"disciplines":[853],"paper_types":[],"tagged":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/questions\/4176"}],"collection":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/questions"}],"about":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/types\/questions"}],"author":[{"embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/comments?post=4176"}],"version-history":[{"count":0,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/questions\/4176\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/media?parent=4176"}],"wp:term":[{"taxonomy":"disciplines","embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/disciplines?post=4176"},{"taxonomy":"paper_types","embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/paper_types?post=4176"},{"taxonomy":"tagged","embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/tagged?post=4176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}