Question: please solve this correctly. this is the third time ive had to send them in . Write a query that will return a listing of
please solve this correctly. this is the third time ive had to send them in
Write a query that will return a listing of the Product Name, Category and SalesRevenue of the Products that have generated the most SalesRevenue the sum of SalePrice times Quantity
SELECT
ProductName,
Category,
SalesRevenue
FROM
SELECT
PProductName,
PCategory,
SUMSISalePrice SIQuantity AS SalesRevenue
FROM
Product P
JOIN
SaleItem SI ON PProductID SIProductID
GROUP BY
Open in Advanced Editor
FEEDBACK
Feedback:
Ignoring case, TOCHAR" could not be found in the query.
$ could not be found in the query.
to highest ListPrice. You will be using the MEDIAN and STDDEV for the qubquery in this question, See sample reults below:
PRODUCTNAME CATEGORY ASKINGPRICE
tianna sandal sandals $
braidy thong sandal sandals $
sean low profile sneaker sneakers $
terry flat sandal sandals $
MEDIANPListPrice OVER AS MedianPrice,
STDDEVPListPrice OVER AS StdDevPrice
FROM
Product P
SELECT
PProductName,
PCategory,
TOCHARPListPrice, FM$ AS AskingPrice
FROM
Product P PriceStats PS
WHERE
PListPrice PSMedianPrice PSStdDevPrice
ORDER BY
FEEDBACK
Feedback:
Your query produces too many rows.
SELECT
PCategory,
PColor,
SUMSISalePrice SIQuantity AS TotalSalesValue
FROM
Product P
Join
SaleItem SI ON PProductID SIProductID
GROUP BY
ROLLUPPCategory, PColor
ORDER BY
PCategory, PColor;
FEEDBACK
Feedback:
Your query produces too many rows.
FROM
Product
WHERE
ManufacturerID SELECT ManufacturerID FROM Manufacturer WHERE ManufacturerName 'Redcat'
SELECT
ProductName
ListPrice
FROM
Product
WHERE
ListPrice SELECT AvgPrice StdDevPrice FROM RedcatStats
ORDER BY
ListPrice DESC;
FEEDBACK
Feedback:
Your query produces too few rows.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
