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 5 Products that have generated the most SalesRevenue (the sum of SalePrice times Quantity).
SELECT
ProductName,
Category,
SalesRevenue
FROM (
SELECT
P.ProductName,
P.Category,
SUM(SI.SalePrice * SI.Quantity) AS SalesRevenue
FROM
Product P
JOIN
SaleItem SI ON P.ProductID = SI.ProductID
GROUP BY
Open in Advanced Editor
FEEDBACK
3/5(60.0\%)
Feedback:
- Ignoring case, "TO_CHAR" could not be found in the query. (-1)
-"\$" could not be found in the query. (-1)
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 $6.99
braidy thong sandal sandals $6.99
sean low profile sneaker sneakers $7.99
terry flat sandal sandals $7.99
MEDIAN(P.ListPrice) OVER () AS MedianPrice,
STDDEV(P.ListPrice) OVER () AS StdDevPrice
FROM
)
Product P
SELECT
P.ProductName,
P.Category,
TO_CHAR(P.ListPrice, 'FM$999,999.00') AS AskingPrice
FROM
Product P, PriceStats PS
WHERE
P.ListPrice (PS.MedianPrice - PS.StdDevPrice)
ORDER BY
```
FEEDBACK
10(50.0\%)
Feedback:
- Your query produces too many rows. (-5)```
SELECT
P.Category,
P.Color,
SUM(SI.SalePrice * SI.Quantity) AS TotalSalesValue
FROM
Product P
Join
SaleItem SI ON P.ProductID = SI.ProductID
GROUP BY
ROLLUP(P.Category, P.Color)
ORDER BY
P.Category, P.Color;
13
```
FEEDBACK
5/10(50.0\%)
Feedback:
- Your query produces too many rows. (-5)```
FROM
Product
WHERE
ManufacturerID =(SELECT ManufacturerID FROM Manufacturer WHERE ManufacturerName = 'Redcat')
SELECT
ProductName
ListPrice
FROM
Product
WHERE
ListPrice >(SELECT AvgPrice +2* StdDevPrice FROM RedcatStats)
ORDER BY
ListPrice DESC;
```
FEEDBACK
2/5(40.0\%)
Feedback:
- Your query produces too few rows. (-3)
please solve this correctly. this is the third

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!