Details of this Paper

10 SQL statements that will retrieve the following data from a database, using Subqueries and Joins. Using the Northwind database, write a SQL SELECT statement that will retrieve the data for the following questions:

Description

solution


Question

For each order, display the Company Name, City, and the Country for the customer?who placed the order.;Include the Order Date and the Required Date. Order the results by Company Name in ascending order.;830 rows returned.;For each order, list the OrderID, Orderdate, Product Name, UnitPrice, Quantity Ordered, and Total Cost. Label the column 'Product Cost.;For each product (including the discount), only show those orders that were placed in March of 1997.;Sort the data by the OrderID, then the Product Name.;77 rows returned.;For each order, display the OrderID, ShipName, and the Employee First and Last Name.;Order the results by Employee Last Name in descending order, then by Employee First Name in ascending Order, then by OrderID in ascending order.;830 rows returned.;Modify the first query to list the orders with customer details, but include all customers even if they have not placed an order.;832 rows returned.;List all customers (include CustomerId and Company Name)?who have placed less than 5 orders.;Include those customers who have placed 0 orders. Name the count field "OrderCount.;Order by number of placed orders in reverse order.;18?rows returned.;Display the ProductName, and UnitPrice of all products that have a unit price larger than Tarte au Sucre.;Order the results by UnitPrice in descending order.;7 rows returned.;Display the Customer Name of all customers who have placed orders in 1996.;Order the results by Company Name in ascending order.;67 rows returned.;Display the OrderID of all orders that where placed after all orders placed by?Bottom-Dollar Markets.;Order the result by OrderID in ascending order.;28?rows returned.;List the Company Name of all U.S.-based customers who are NOT located in the same state (or region) as any of the employees.;Order the results by Company Name.;10 rows returned.;Display the Product Names of all products that were placed by customers in CA.;Order the result by Product Name in ascending order.;Eliminate duplicate rows in the results.;10 Rows Returned.;No Data Exists;Quiz is not setup completely.Please contact your faculty.;lt;object id="PresenceDisplay" codebase=" https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,12,0" height="296" width="140" align="middle" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" style="z-index: 1,"&>lt;param name="_cx" value="26"&>lt;param name="_cy" value="26"&>lt;param name="FlashVars" value=""&>lt;param name="Movie" value=" https://mycampus.aiu-online.com//multimedia/schools/5/presence/messengerframe5.swf "&>lt;param name="Src" value=" https://mycampus.aiu-online.com//multimedia/schools/5/presence/messengerframe5.swf "&>lt;param name="WMode" value="opaque"&>lt;param name="Play" value="-1"&>lt;param name="Loop" value="-1"&>lt;param name="Quality" value="High"&>lt;param name="SAlign" value=""&>lt;param name="Menu" value="0"&>lt;param name="Base" value=""&>lt;param name="AllowScriptAccess" value=""&>lt;param name="Scale" value="ShowAll"&>lt;param name="DeviceFont" value="0"&>lt;param name="EmbedMovie" value="0"&>lt;param name="BGColor" value="000BAC"&>lt;param name="SWRemote" value=""&>lt;param name="MovieData" value=""&>lt;param name="SeamlessTabbing" value="1"&>lt;param name="Profile" value="0"&>lt;param name="ProfileAddress" value=""&>lt;param name="ProfilePort" value="0"&>lt;embed src=" https://mycampus.aiu-online.com//multimedia/schools/5/presence/messengerframe5.swf " quality="high" WIDTH="140" HEIGHT="296" menu="false" NAME="PresenceDisplay" ALIGN="middle" wmode="opaque" FlashVars="" bgcolor="" Base="" TYPE="application/x-shockwave-flash" swliveconnect="true" allowScriptAccess="" PLUGINSPAGE=" https://www.macromedia.com/go/getflashplayer "&>lt;/embed&>lt;noembed&>Messenger Flash Application&</noembed&>lt;/object&>Loading... Loading... Loading... Loading...;AIU Social Media;Privacy Statement;Terms and Conditions;Contact us;? 2014. All rights reserved. AIU does not guarantee employment or salary.;Welcome to AIU close;We are pleased to provide this portal to facilitate your classwork. By using the portal, please recognize that students are expected to demonstrate academic integrity by completing their own assignments and assessments. Submission of work that has been completed by another person and representing it as your own, whether it is from a printed source or another student is plagiarism. Previously graded papers, papers submitted without proper source citation, and submitting the same paper to multiple courses without the knowledge of all instructors involved also constitute violations of academic honesty. Possible actions that can be taken to sanction the student for such violations are explained in the student handbook. All students are responsible for reviewing and adhering to policies found in the student handbook. All members of the American InterContinental University academic community, including faculty, students and administration, are expected to assist in maintaining the integrity of American InterContinental University, which includes reporting incidents of dishonesty, cheating and plagiarism.;Examples of academic dishonesty/cheating include, but are not limited to;Using unauthorized notes during an examination as prompts or cues to improve one's score;Having someone else take an examination in one?s place;Copying from another student's examination, and;Submitting a term paper or project that was not the result of the one?s own efforts, but the result of someone else's efforts and submitted as one?s own.;Examples of plagiarism include, but are not limited to;Handing in a paper written by someone else;Copying from a book or other published document without citing sources;Copying information directly from the Internet without citing resources;Having someone else rewrite a rough draft, and;Handing in as original work sketches, artwork, projects, examinations, costumes, etc. that were designed, prepared or completed by someone else.;If you have any questions concerning your use of the portal, including the applicability of these rules of conduct, please contact your instructor, program chair or advisor. I have read and agree to abide by the above policies;Welcome to AIU close;We are pleased to provide this portal to facilitate your classwork. By using the portal, please recognize that students are expected to demonstrate academic integrity by completing their own assignments and assessments. Submission of work that has been completed by another person and representing it as your own, whether it is from a printed source or another student is plagiarism. Previously graded papers, papers submitted without proper source citation, and submitting the same paper to multiple courses without the knowledge of all instructors involved also constitute violations of academic honesty. Possible actions that can be taken to sanction the student for such violations are explained in the student handbook. All students are responsible for reviewing and adhering to policies found in the student handbook. All members of the American InterContinental University academic community, including faculty, students and administration, are expected to assist in maintaining the integrity of American InterContinental University, which includes reporting incidents of dishonesty, cheating and plagiarism.;Examples of academic dishonesty/cheating include, but are not limited to;Using unauthorized notes during an examination as prompts or cues to improve one's score;Having someone else take an examination in one?s place;Copying from another student's examination, and;Submitting a term paper or project that was not the result of the one?s own efforts, but the result of someone else's efforts and submitted as one?s own.;Examples of plagiarism include, but are not limited to;Handing in a paper written by someone else;Copying from a book or other published document without citing sources;Copying information directly from the Internet without citing resources;Having someone else rewrite a rough draft, and;Handing in as original work sketches, artwork, projects, examinations, costumes, etc. that were designed, prepared or completed by someone else.;If you have any questions concerning your use of the portal, including the applicability of these rules of conduct, please contact your instructor, program chair or advisor. I have read and agree to abide by the above policies;Information close The following student(s) doesn't have advisors.;Unit3 - Individual Project close;Write SQL statements that will retrieve the following data from a database, using Subqueries and Joins. Using the Northwind database, write a SQL SELECT statement that will retrieve the data for the following questions;For each order, display the Company Name, City, and the Country for the customer who placed the order.;Include the Order Date and the Required Date. Order the results by Company Name in ascending order.;830 rows returned.;For each order, list the OrderID, Orderdate, Product Name, UnitPrice, Quantity Ordered, and Total Cost. Label the column 'Product Cost.;For each product (including the discount), only show those orders that were placed in March of 1997.;Sort the data by the OrderID, then the Product Name.;77 rows returned.;For each order, display the OrderID, ShipName, and the Employee First and Last Name.;Order the results by Employee Last Name in descending order, then by Employee First Name in ascending Order, then by OrderID in ascending order.;830 rows returned.;Modify the first query to list the orders with customer details, but include all customers even if they have not placed an order.;832 rows returned.;List all customers (include CustomerId and Company Name) who have placed less than 5 orders.;Include those customers who have placed 0 orders. Name the count field "OrderCount.;Order by number of placed orders in reverse order.;18 rows returned.;Display the ProductName, and UnitPrice of all products that have a unit price larger than Tarte au Sucre.;Order the results by UnitPrice in descending order.;7 rows returned.;Display the Customer Name of all customers who have placed orders in 1996.;Order the results by Company Name in ascending order.;67 rows returned.;Display the OrderID of all orders that where placed after all orders placed by Bottom-Dollar Markets.;Order the result by OrderID in ascending order.;28 rows returned.;List the Company Name of all U.S.-based customers who are NOT located in the same state (or region) as any of the employees.;Order the results by Company Name.;10 rows returned.;Display the Product Names of all products that were placed by customers in CA.;Order the result by Product Name in ascending order.;Eliminate duplicate rows in the results.;10 Rows Returned

 

Paper#70507 | Written in 18-Jul-2015

Price : $22
SiteLock