A sub-query is needed to answer this question. See the notes in the assignment specification document....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A sub-query is needed to answer this question. See the notes in the assignment specification document. Write a query to return the following result set: Columns: - ProductCategoryID -ProductCategoryName - ParentProductCategoryID (NULL if the category has no parent) - ParentSubCatCount: the number of subcategories the parent has; NULL or O if the category has no parent Rows: - All Product Categories with ID greater than 1000 Enter into Canvas the "answerToSubmit" value produced by this query: SELECT SUM(ProductCategoryID + LEN(ProductCategoryName) + ParentProductCategoryID + ParentSubCatCount) AS answerToSubmit FROM ( --paste your query's code here (this is the query you write which uses a sub-query). ) 916 *** QUESTION 17 (SEVENTEEN) *** List all customers who have ordered less than $34,118.5356 worth of products across all their orders (excluding tax and freight, but including discounts). Customers who have not placed an order are considered to have ordered $0.00. Use an order header's SubTotal to determine a customer's order amount. Treat SubTotal as including discounts. Enter into Canvas the number of customers in the list found above. 100 % SELECT C. CustomerID, SUM (ISNULL(SOH. SubTotal,0)) AS [SUBTOTAL] FROM SalesLT.SalesOrderHeader AS SOH RIGHT JOIN Sales LT. Customer AS C ON C. CustomerID = SOH. CustomerID GROUP BY C. CustomerID HAVING SUM (ISNULL(SOH. SubTotal,0)) < 34118.5356 ORDER BY SUM (ISNULL(SOH. SubTotal, 0) Results Messages CustomerID SUBTOTAL 1 259 0.00 2 262 0.00 3 263 0.00 4 264 0.00 5 268 0.00 6 271 0.00 7 272 0.00 8 273 0.00 9 274 0.00 10 275 0.00 11 276 0.00 12 277 0.00 13 280 0.00 14 281 0.00 15 282 0.00 16 286 0.00 17 287 0.00 18 288 0.00 19 289 0.00 Query executed successfully. (localdb)\mssqllocaldb (13.... | PUSSY-DESTROYER\georg... | AWLTSQLASGMT | 00:00:00 | 813 rows A sub-query is needed to answer this question. See the notes in the assignment specification document. Write a query to return the following result set: Columns: - ProductCategoryID -ProductCategoryName - ParentProductCategoryID (NULL if the category has no parent) - ParentSubCatCount: the number of subcategories the parent has; NULL or O if the category has no parent Rows: - All Product Categories with ID greater than 1000 Enter into Canvas the "answerToSubmit" value produced by this query: SELECT SUM(ProductCategoryID + LEN(ProductCategoryName) + ParentProductCategoryID + ParentSubCatCount) AS answerToSubmit FROM ( --paste your query's code here (this is the query you write which uses a sub-query). ) 916 *** QUESTION 17 (SEVENTEEN) *** List all customers who have ordered less than $34,118.5356 worth of products across all their orders (excluding tax and freight, but including discounts). Customers who have not placed an order are considered to have ordered $0.00. Use an order header's SubTotal to determine a customer's order amount. Treat SubTotal as including discounts. Enter into Canvas the number of customers in the list found above. 100 % SELECT C. CustomerID, SUM (ISNULL(SOH. SubTotal,0)) AS [SUBTOTAL] FROM SalesLT.SalesOrderHeader AS SOH RIGHT JOIN Sales LT. Customer AS C ON C. CustomerID = SOH. CustomerID GROUP BY C. CustomerID HAVING SUM (ISNULL(SOH. SubTotal,0)) < 34118.5356 ORDER BY SUM (ISNULL(SOH. SubTotal, 0) Results Messages CustomerID SUBTOTAL 1 259 0.00 2 262 0.00 3 263 0.00 4 264 0.00 5 268 0.00 6 271 0.00 7 272 0.00 8 273 0.00 9 274 0.00 10 275 0.00 11 276 0.00 12 277 0.00 13 280 0.00 14 281 0.00 15 282 0.00 16 286 0.00 17 287 0.00 18 288 0.00 19 289 0.00 Query executed successfully. (localdb)\mssqllocaldb (13.... | PUSSY-DESTROYER\georg... | AWLTSQLASGMT | 00:00:00 | 813 rows A sub-query is needed to answer this question. See the notes in the assignment specification document. Write a query to return the following result set: Columns: - ProductCategoryID -ProductCategoryName - ParentProductCategoryID (NULL if the category has no parent) - ParentSubCatCount: the number of subcategories the parent has; NULL or O if the category has no parent Rows: - All Product Categories with ID greater than 1000 Enter into Canvas the "answerToSubmit" value produced by this query: SELECT SUM(ProductCategoryID + LEN(ProductCategoryName) + ParentProductCategoryID + ParentSubCatCount) AS answerToSubmit FROM ( --paste your query's code here (this is the query you write which uses a sub-query). ) 916 *** QUESTION 17 (SEVENTEEN) *** List all customers who have ordered less than $34,118.5356 worth of products across all their orders (excluding tax and freight, but including discounts). Customers who have not placed an order are considered to have ordered $0.00. Use an order header's SubTotal to determine a customer's order amount. Treat SubTotal as including discounts. Enter into Canvas the number of customers in the list found above. 100 % SELECT C. CustomerID, SUM (ISNULL(SOH. SubTotal,0)) AS [SUBTOTAL] FROM SalesLT.SalesOrderHeader AS SOH RIGHT JOIN Sales LT. Customer AS C ON C. CustomerID = SOH. CustomerID GROUP BY C. CustomerID HAVING SUM (ISNULL(SOH. SubTotal,0)) < 34118.5356 ORDER BY SUM (ISNULL(SOH. SubTotal, 0) Results Messages CustomerID SUBTOTAL 1 259 0.00 2 262 0.00 3 263 0.00 4 264 0.00 5 268 0.00 6 271 0.00 7 272 0.00 8 273 0.00 9 274 0.00 10 275 0.00 11 276 0.00 12 277 0.00 13 280 0.00 14 281 0.00 15 282 0.00 16 286 0.00 17 287 0.00 18 288 0.00 19 289 0.00 Query executed successfully. (localdb)\mssqllocaldb (13.... | PUSSY-DESTROYER\georg... | AWLTSQLASGMT | 00:00:00 | 813 rows A sub-query is needed to answer this question. See the notes in the assignment specification document. Write a query to return the following result set: Columns: - ProductCategoryID -ProductCategoryName - ParentProductCategoryID (NULL if the category has no parent) - ParentSubCatCount: the number of subcategories the parent has; NULL or O if the category has no parent Rows: - All Product Categories with ID greater than 1000 Enter into Canvas the "answerToSubmit" value produced by this query: SELECT SUM(ProductCategoryID + LEN(ProductCategoryName) + ParentProductCategoryID + ParentSubCatCount) AS answerToSubmit FROM ( --paste your query's code here (this is the query you write which uses a sub-query). ) 916 *** QUESTION 17 (SEVENTEEN) *** List all customers who have ordered less than $34,118.5356 worth of products across all their orders (excluding tax and freight, but including discounts). Customers who have not placed an order are considered to have ordered $0.00. Use an order header's SubTotal to determine a customer's order amount. Treat SubTotal as including discounts. Enter into Canvas the number of customers in the list found above. 100 % SELECT C. CustomerID, SUM (ISNULL(SOH. SubTotal,0)) AS [SUBTOTAL] FROM SalesLT.SalesOrderHeader AS SOH RIGHT JOIN Sales LT. Customer AS C ON C. CustomerID = SOH. CustomerID GROUP BY C. CustomerID HAVING SUM (ISNULL(SOH. SubTotal,0)) < 34118.5356 ORDER BY SUM (ISNULL(SOH. SubTotal, 0) Results Messages CustomerID SUBTOTAL 1 259 0.00 2 262 0.00 3 263 0.00 4 264 0.00 5 268 0.00 6 271 0.00 7 272 0.00 8 273 0.00 9 274 0.00 10 275 0.00 11 276 0.00 12 277 0.00 13 280 0.00 14 281 0.00 15 282 0.00 16 286 0.00 17 287 0.00 18 288 0.00 19 289 0.00 Query executed successfully. (localdb)\mssqllocaldb (13.... | PUSSY-DESTROYER\georg... | AWLTSQLASGMT | 00:00:00 | 813 rows
Expert Answer:
Answer rating: 100% (QA)
select ProductCategoryId ProductCategoryName nvlParentProductCategoryid NULL ParentSubCatCount from ... View the full answer
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Posted Date:
Students also viewed these programming questions
-
Solve the following system. 10. q = 1 (mod 3) q = 2 (mod 4) q = -5 (mod 5) q = 5 (mod 7) 0
-
Direction: Simplify the Boolean functions given below using K-map. F(A,B,C)=A'BC+A'BC'+ABC+ABC' (6marks) 2. F(A,B,C)=A'B'C'+AB'C'+A'BC'+ABC' (6marks)
-
Calculate z(2, 3, 1), where (x, y, z) = xyz.
-
KEW Enterprises began operations in January 2015 to manufacture a hand sanitizer that promised to be more effective and gentler on the skin than existing products. Family members, one of whom was...
-
1. What should Sheila have done to avoid interviews like this one? 2. Explain why Sheila, not Pete, should make the selection decision.
-
What is an investors objective in financial statement analysis? (a) To decide whether the borrower has the ability to repay interest and principal on borrowed funds. (b) To determine if the firm...
-
Movie companies need to predict the gross receipts of individual movies once a movie has debuted. The data, shown in the next column and stored in Potter Movies , are the first weekend gross, the U....
-
What kind of accountability can social workers be directly involved with in program and practice accountability?
-
Southeastern Foods has hired you to analyze their distribution-system design. The company has 11 distribution centers, with monthly volumes as listed below. Seven of these sites can support...
-
Check 1 PA 4-2 (Algo) Consider a process consisting of... Consider a process consisting of three resources. Assume there exists unlimited demand for the product, and that all activities are always...
-
Remember, a business case is ajustification for a business project. A business case requests funding for a project internally from anorganization'sfinancial decision-makers or externally from...
-
Many companies locate manufacturing activities in countries with low labour costs and few labour laws. What ethical obligations do businesses have when operating in such countries?
-
Please advise on the labour laws and industrial relations system in Singapore ?
-
1. Identify three examples of pathos in this speech. 2. Identify three examples of logos in this speech. 3. How did Thunberg create ethos in her speech? 4. What logical fallacies did you find in this...
-
For job applicants, what are the limitations of labour law protections against discriminatory hiring decisions?
-
Robin owns Expert Salon Trend (EST), a hair salon products distribution company. After working for his father, a barber and beauty salon products distributor, he started his own business selling Paul...
-
Funds are separate fiscal and accounting entities, each with its own self-balancing set of accounts. The newly established Society for Ethical Teachings maintains two funds-a general fund for...
-
Parallel query processing, as described in this chapter, means that the same query is run on multiple processors and that each processor accesses in parallel a different subset of the database....
-
Read a SAS White Paper (www.sas.com/ resources/whitepaper/wp_56343.pdf) on the use of telematics in car insurance. If Fitchwood started to use one of these technologies, what consequences would it...
-
Match the following terms and definitions: _________ Data _________ Database application _________ Constraint _________ Repository _________ Metadata _________ Data warehouse _________ Information...
-
Why do you think we would want to look at the accounts receivable in the accounting books as often as once a month?
-
Explain how an ABS CDO is structured.
-
Why do you think we would want to draw these two extra lines onto the handwritten account?
Study smarter with the SolutionInn App