Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Write SQL queries that meet the following specifications. Do not show output. All questions are worth three marks.

a) Display the order number and customer number for all orders. Sort by order number within customer number.
b) Display full details for all rows where the shipping street contains the string MAIN.
c) Display the title for each book and the profit margin for that book (profit = retail - cost). Your query should produce output in the following format. The book earned a profit of <profit>, for example: The book Easy SQL earned a profit of $30.<br />d) Display full details for all books that cost less than thirty dollars and are in the FITNESS category OR cost more than thirty dollars and are in the SELF HELP category.<br />e) Display the customer id and the average length of time elapsed between an order being placed and the actual shipment of that order (shipment time) for all orders placed by that customer. Display the average length of time in months rounded to the nearest month.<br />f) Display complete details for the order/s with the earliest shipdate.<br />g) Using a set operator, display the customer number for all customers who placed an order during March, 2002 and who were referred by another customer. The column called referred may contain null values.<br />h) For each order item, display the order#, customer last name, item# and quantity.<br />i) Using a set operator, display the order number for all orders that have no items.</p> <p style="text-align: justify;">j) Display the order number and total quantity ordered for all orders that have a total quantity greater than 120.</p> <p style="text-align: justify;">Question 2</p> <p style="text-align: justify;">Write ONE PL/SQL program (anonymous block) that provides a report of all books published by specific publishers that have sold more than one thousand copies. The report should insert into an existing table the publisher name and the total number of copies of all books sold for that publisher (subject to specific business rules). The detailed specification is as follows:</p> <p style="text-align: justify;">· Using an explicit cursor, retrieve all books from the books table that were published by publishers 2, 6 or 7.<br />· Books with a retail price greater than $1 should be selected for further processing. This operation must be done using the IF statement.<br />· Using a second explicit cursor (with appropriate parameters), count the number of copies that the book has sold. Store the total count in a local variable named BOOKCOUNT and the total count of all books for a particular publisher in PUBCOUNT.<br />· If the book has sold one thousand or less copies, move to the next book. If no book has sold one thousand or more copies, exit the program and display the following message: There are no high sales books for these publishers.<br />· If a book has sold one thousand copies or more, retrieve details about the publisher. Use an explicit cursor.<br />· Into a table named HIGHCOUNT, insert the publisher name and the total count of all books sold for that publisher. This table has three columns as follows: publisher name, pubcount and rundate.<br />· Create an exception handler which fires when no rows are found. The exception handler should output the following message to the screen: No rows found.</p></span> </div></div></div> <div id="viewreadmore" class="que_link"> <a id="readmore" href="javascript:void(0);" style="font-size: 14px; color: #ff700c;" class="read-more-trigger mar_top10" onclick="changeheight(this)">View complete question</a> </div> <div class="innercanteenouter_inner_center3"> <p>Computer Engineering, <span>Engineering</span> </p> </div> <div class="clear"></div> </div> </div> <div class="innercanteenouter_inner_center6"> <div class="innercanteenouter_inner_center6_center7"> <div class="innercanteenouter_inner_center6_center"> <ul> <li class="innercanteenouter1"> Category:- <span>Computer Engineering</span> </li> <li class="innercanteenouter2"> Reference No.:- <span>M91607693 </span> </li> </ul> <div class="clear"></div> <input type="submit" name="btnASolution" value="Order Now to Get Expert's Answer" id="btnASolution" class="innercanteenouter_inner_center6_center2" /> </div> <div class="innerjohnanswered1"> <div class="innerjohnanswered1ftti"><h2></h2> <p></p> </div> <div class="clear"></div> </div> </div> </div> <div class="inneranswer"> <b>Have any Question?</b><span id="RequiredFieldValidator1" style="background-color:Yellow;visibility:hidden;">Write your Review or question?</span> <br /><br /> <div class="inneranswerhgrows"> <textarea name="txtReview" id="txtReview" class="inneranswerhgrowss" ValidationGroup="Review" placeholder=" Write your message!!"></textarea> </div> <div class="inneranswerhgrowsddf"> <input type="submit" name="btnReview" value="Have Question" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnReview", "", true, "Review", "", false, false))" id="btnReview" class="planpageinnerrightcontleftcommetgetquotebt" /> </div> </div> <br /> <div class="innerquestions"> <h2>Related Questions in Computer Engineering</h2> <table id="dlReviewList" cellspacing="0" style="width:100%;border-collapse:collapse;"> <tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_0"><b><a href='http://www.mywordsolution.com/question/it-is-just-a-simple-calculator-code-c-language-ltstdiohgt/93119341' target='_balnk' class='que_link' >It is just a simple calculator code c language ltstdiohgt</a></b></span></h3> <p> <span id="dlReviewList_lblContent_0">It is just a simple calculator code. C++ language library A) Display on the screen the following menu: Welcome to my calculator Please look at the menu below for your calculations 1. Addition 2. Subtraction 3. Multiplica ...</span> </p> </div> </td> </tr><tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_1"><b><a href='http://www.mywordsolution.com/question/question-suppose-that-a-store-offers-gift-certificates-in/93130834' target='_balnk' class='que_link' >Question suppose that a store offers gift certificates in</a></b></span></h3> <p> <span id="dlReviewList_lblContent_1">Question : Suppose that a store offers gift certificates in denominations of 25 dollars and 40 dollars. Determine the possible total amounts you can form using these gift certificates. Prove your answer using strong indu ...</span> </p> </div> </td> </tr><tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_2"><b><a href='http://www.mywordsolution.com/question/assignmentroyal-wallace-a-uk-based-transportation-company/93113094' target='_balnk' class='que_link' >Assignmentroyal wallace a uk-based transportation company</a></b></span></h3> <p> <span id="dlReviewList_lblContent_2">Assignment Royal Wallace, a UK-based transportation company, is a global leader in the rail equipment and servicing industry. Its wide-range of products includes passenger rail vehicles and total transit systems. It also ...</span> </p> </div> </td> </tr><tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_3"><b><a href='http://www.mywordsolution.com/question/question-how-will-you-create-the-cicd-process-for-this/93116162' target='_balnk' class='que_link' >Question how will you create the cicd process for this</a></b></span></h3> <p> <span id="dlReviewList_lblContent_3">Question: How will you create the CI/CD process for this application? Propose the tools, technologies required to achieve CI/CD in general. The response must be typed, single spaced, must be in times new roman font (size ...</span> </p> </div> </td> </tr><tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_4"><b><a href='http://www.mywordsolution.com/question/if-we-take-infinite-samples-of-size-n--49-from-a-population/93133228' target='_balnk' class='que_link' >If we take infinite samples of size n 49 from a population</a></b></span></h3> <p> <span id="dlReviewList_lblContent_4">If we take infinite samples of size n = 49 from a population with a distribution with high kurtosis and standard deviation 7, select the best answer below. * The sampling distribution of the sample means will have a stan ...</span> </p> </div> </td> </tr><tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_5"><b><a href='http://www.mywordsolution.com/question/on-the-below-question-how-did-they-decided-the-two/93109403' target='_balnk' class='que_link' >On the below question how did they decided the two</a></b></span></h3> <p> <span id="dlReviewList_lblContent_5">On the below question, how did they decided the two probabilities of guessing the correct and wrong answer on a question? Where did the 0.25 and 0.75 come from? The probability of achieving exactly  k  successes in  n  t ...</span> </p> </div> </td> </tr><tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_6"><b><a href='http://www.mywordsolution.com/question/do-you-need-computers-or-information-and-communication/93116845' target='_balnk' class='que_link' >Do you need computers or information and communication</a></b></span></h3> <p> <span id="dlReviewList_lblContent_6">Do you need computers or information and communication technologies to store, organize, and manage data in organizations? Explain how the present day organizations in a developed country like the USA store and manage the ...</span> </p> </div> </td> </tr><tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_7"><b><a href='http://www.mywordsolution.com/question/structureswrite-the-program-in-c-onlytask-create-a-seating/93124589' target='_balnk' class='que_link' >Structureswrite the program in c onlytask create a seating</a></b></span></h3> <p> <span id="dlReviewList_lblContent_7">Structures Write the Program in C++ only. Task: Create a seating reservation program for Podunk Airlines. The air fleet consists of a single plane with a seating capacity of 12. The plane makes one flight daily. Your pro ...</span> </p> </div> </td> </tr><tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_8"><b><a href='http://www.mywordsolution.com/question/explain-data-information-and-knowledge-with-examples-make/93113428' target='_balnk' class='que_link' >Explain data information and knowledge with examples make</a></b></span></h3> <p> <span id="dlReviewList_lblContent_8">Explain data, information, and knowledge with examples. Make sure to clearly identify the differences between the terms.</span> </p> </div> </td> </tr><tr> <td> <div class="innerquestionsgtr"> <h3> <span id="dlReviewList_lblTitle_9"><b><a href='http://www.mywordsolution.com/question/what-is-the-transmission-type-transmission-form/93121634' target='_balnk' class='que_link' >What is the transmission type transmission form</a></b></span></h3> <p> <span id="dlReviewList_lblContent_9">What is the Transmission Type, Transmission Form, Transmission Speed, Address for Transmission and Collusion for hubs?</span> </p> </div> </td> </tr><tr> <td></td> </tr> </table> </div> <div class="innerlogo"> <ul> <li><div class="innerlogoback1"></div></li> <li><div class="innerlogoback2"></div></li> <li><div class="innerlogoback3"></div></li> </ul> </div> </div> <div class="innercanteenouter_inner_right"> <div class="innercanteenouter_inner_right1"> <div class="innercanteenouter_inner_right1pou"> <ul> <li class="red1"> <div class="counterDivTag">4,153,160 Questions Asked</div> </li> <li class="oring1"><div class="counterDivTag">13,132 Experts</div></li> <li class="grine1"><div class="counterDivTag">2,558,936 Questions Answered</div></li> </ul> <div class="clear"></div> <h2>Ask Experts for help!!</h2> </div> </div> <div class="innerchoose"> <h2>Looking for Assignment Help?</h2> <p> <b>Start excelling in your Courses, Get help with Assignment</b><br /><br /> Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time. </p> <a href="http://www.mywordsolution.com/free-quote-job-posting.aspx">Ask Now</a> <span>Help with Problems, Get a Best Answer</span> </div> <div class="innertranspoitation"> <div class="innertranspoitation1"> <ul> <li><a href="#">Recent Questions </a></li> </ul> <div class="clear"></div> </div> <table id="LeftSideControl1_RecentQuestion1_dlReviewList" cellspacing="0" style="width:100%;border-collapse:collapse;"> <tr> <td> <div class="innertranspoitation2"> <h3><span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblTitle_0"><b><a href='http://www.mywordsolution.com/question/why-might-a-bank-avoid-the-use-of-interest-rate-swaps-even/93137978' target='_balnk' class='que_link' >Why might a bank avoid the use of interest rate swaps even</a></b></span></h3> <p> <span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblContent_0">Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate</span> </p> </div> </td> </tr><tr> <td> <div class="innertranspoitation2"> <h3><span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblTitle_1"><b><a href='http://www.mywordsolution.com/question/describe-the-difference-between-zero-coupon-bonds-and/93137977' target='_balnk' class='que_link' >Describe the difference between zero coupon bonds and</a></b></span></h3> <p> <span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblContent_1">Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p</span> </p> </div> </td> </tr><tr> <td> <div class="innertranspoitation2"> <h3><span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblTitle_2"><b><a href='http://www.mywordsolution.com/question/compute-the-present-value-of-an-annuity-of--880-per-year/93137976' target='_balnk' class='que_link' >Compute the present value of an annuity of 880 per year</a></b></span></h3> <p> <span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblContent_2">Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As</span> </p> </div> </td> </tr><tr> <td> <div class="innertranspoitation2"> <h3><span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblTitle_3"><b><a href='http://www.mywordsolution.com/question/compute-the-present-value-of-an-1150-payment-made-in-ten/93137975' target='_balnk' class='que_link' >Compute the present value of an 1150 payment made in ten</a></b></span></h3> <p> <span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblContent_3">Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int</span> </p> </div> </td> </tr><tr> <td> <div class="innertranspoitation2"> <h3><span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblTitle_4"><b><a href='http://www.mywordsolution.com/question/compute-the-present-value-of-an-annuity-of--699-per-year/93137974' target='_balnk' class='que_link' >Compute the present value of an annuity of 699 per year</a></b></span></h3> <p> <span id="LeftSideControl1_RecentQuestion1_dlReviewList_lblContent_4">Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As</span> </p> </div> </td> </tr><tr> <td></td> </tr> </table> </div> </div> <div class="clear"></div> </div> <div class="clear"></div> </div> </div> <div class="footer"> <div class="footerouter"> <div class="footerouter_inner"> <div class="footerouter_left"> <ul> <li> <div class="footerouter_left1"> <ul> <li><a href="http://www.mywordsolution.com/homework-help/science/8">Science</a></li> <li><a href="http://www.mywordsolution.com/homework-help/english/390">English</a></li> <li><a href="http://www.mywordsolution.com/homework-help/biology/384">Biology</a></li> <li><a href="http://www.mywordsolution.com/homework-help/humanities/388">Humanities</a></li> </ul> </div> </li> <li> <div class="footerouter_left1"> <ul> <li><a href="http://www.mywordsolution.com/homework-help/engineering/9">Engineering</a></li> <li><a href="http://www.mywordsolution.com/homework-help/programming/10">Programming</a></li> <li><a href="http://www.mywordsolution.com/homework-help/computer-science/11">Computers/IT Courses</a></li> </ul> </div> </li> <li> <div class="footerouter_left1"> <ul> <li><a href="http://www.mywordsolution.com/homework-help/accounting/1">Accounting</a></li> <li><a href="http://www.mywordsolution.com/homework-help/finance/2">Finance</a></li> <li><a href="http://www.mywordsolution.com/homework-help/management/7">Management</a></li> <li><a href="http://www.mywordsolution.com/homework-help/statistics/6">Statistics</a></li> <li><a href="http://www.mywordsolution.com/homework-help/economics/5">Economics</a></li> <li><a href="http://www.mywordsolution.com/homework-help/taxation/4">Taxation</a></li> <li><a href="http://www.mywordsolution.com/homework-help/law/3">LAW Assignment Help</a></li> </ul> </div> </li> <li> <div class="footerouter_left1"> <ul> <li><a href="http://www.mywordsolution.com/homework-help/essay/13">Essay Writing Help</a></li> <li><a href="http://www.mywordsolution.com/homework-help/dissertation/12">Dissertation Help</a></li> <li><a href="http://www.mywordsolution.com/homework-help/thesis-writing/117">Thesis Help</a></li> <li><a href="http://www.mywordsolution.com/homework-help/literature-review/79">Literature Review</a></li> <li><a href="http://www.mywordsolution.com/homework-help/research-paper/78">Research Paper</a></li> <li><a href="http://www.mywordsolution.com/homework-help/solved-classroom-assignments/77">Solved Problems</a></li> <li><a href="http://www.mywordsolution.com/homework-help/popular-courses-and-coursework-help/82 ">Coursework Help</a></li> </ul> </div> </li> <div class="clear"></div> </li> </ul> </div> <div class="footerouter_right"> <div class="footerouter_right0"> <div class="footerpayment"> <div class="footerpaymentscur"></div> <div class="footerpaymentscard"> <ul> <li class="footerpaymentscard1"></li> <li class="footerpaymentscard2"></li> <li class="footerpaymentscard3"></li> <li class="footerpaymentscard4"></li> </ul> </div> </div> <div class="footerouter_right1"> <h2>Follow Us</h2> <ul> <li class="fb"><a href="http://www.facebook.com/Mywordsolution" rel="nofollow" target="_blank"></a></li> <li class="twt"><a href="http://www.twitter.com/Mywordsolution" rel="nofollow" target="_blank"></a></li> </ul> <div class="clear"></div> </div> </div> </div> <div class="clear"></div> </div> </div> <div class="footerbottom"> <div class="footerbottom_inner"> <ul> <li><a href="http://www.mywordsolution.com/">Home</a></li> <li><a href="http://www.mywordsolution.com/about-us.aspx">About Us</a></li> <li><a href="http://www.mywordsolution.com/blog/">Blog</a></li> <li><a href="http://www.mywordsolution.com/faqs.aspx">FAQs</a></li> <li><a href="http://www.mywordsolution.com/ask-question.aspx">Assignment Help</a></li> <li><a href="http://www.mywordsolution.com/homework-help.aspx">Homework Help</a></li> <li><a href="http://www.mywordsolution.com/contactus.aspx">Contact Us</a></li> <li><a href="http://www.mywordsolution.com/questions/archive/">Q&A</a></li> <li><a href="http://www.mywordsolution.com/directory.aspx">Directory</a></li> <li><a href="http://www.mywordsolution.com/sitemap.aspx">Sitemap</a></li> <li><a href="http://www.mywordsolution.com/refund-policy.aspx">Refund Policy</a></li> <li><a href="http://www.mywordsolution.com/privacy-policy.aspx">Privacy Policy</a></li> <li><a href="http://www.mywordsolution.com/terms-and-conditions.aspx">T & C </a></li> <li><a href="http://www.mywordsolution.com/disclaimer-policy.aspx">Disclaimer Policy</a></li> <li> <a href="http://www.mywordsolution.com/copyright-notice.aspx">Copyright Notice</a></li> </ul> <div class="clear"></div> <p>© Copyright 2013-14 <span>mywordsolution.com</span> All rights reserved </p> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-38762144-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.mywordsolution.com/library/js/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <!--Start of Tawk.to Script--> <script type="text/javascript"> var $_Tawk_API={},$_Tawk_LoadStart=new Date(); (function(){ var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0]; s1.async=true; s1.src='https://embed.tawk.to/5584638c0ed4869955a0dce2/default'; s1.charset='UTF-8'; s1.setAttribute('crossorigin','*'); s0.parentNode.insertBefore(s1,s0); })(); </script> <!--End of Tawk.to Script--> </div> </div> </div> <script type="text/javascript"> //<![CDATA[ var Page_Validators = new Array(document.getElementById("RequiredFieldValidator1")); //]]> </script> <script type="text/javascript"> //<![CDATA[ var RequiredFieldValidator1 = document.all ? document.all["RequiredFieldValidator1"] : document.getElementById("RequiredFieldValidator1"); RequiredFieldValidator1.controltovalidate = "txtReview"; RequiredFieldValidator1.errormessage = "Write your Review or question?"; RequiredFieldValidator1.validationGroup = "Review"; RequiredFieldValidator1.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid"; RequiredFieldValidator1.initialvalue = ""; //]]> </script> <script type="text/javascript"> //<![CDATA[ var Page_ValidationActive = false; if (typeof(ValidatorOnLoad) == "function") { ValidatorOnLoad(); } function ValidatorOnSubmit() { if (Page_ValidationActive) { return ValidatorCommonOnSubmit(); } else { return true; } } //]]> </script> </form> </body> </html>