1.What is the average shipping cost on a sale? (Name the column AverageShipping)
ID: 3711154 • Letter: 1
Question
1.What is the average shipping cost on a sale? (Name the column AverageShipping). Also use the Round function to two decimal places for currency, i.e. round ( .. , 2) .
2.What is the average shipping cost on sales made in the month of June? Name the column AverageShipping. Also use the Round function to two decimal places for currency, i.e. round ( ... , 2) .
3.How many products does Redcat have from Manufacturer 154? (Name the column NumberProducts.)
4.What is the largest dollar amount (SalePrice times Quantity) for a sale item that was ever made? Name it LargestItemSale.
5.Which products have the highest list price, and what is that price? (Hint: Use a subquery) Only show product name and the price.
Explanation / Answer
1)
SELECT Round(AVG(Price),2) as AverageShipping
FROM Products ;
2)
SELECT Round(AVG(Price),2) as AverageShipping
FROM Products WHERE MONTH= 'JUNE';
3)
SELECT COUNT(ProductID) AS NUMBERPRODUCTS
FROM Products WHERE MANUFATURENAME = 'Manufacturer 154' AND PRODUCTNAME = 'REDCAT';
4)
SELECT MAX(PRICE*QUANTITY) AS LargestItemSales from products
5)
On sufficent information or question is not clear
1)
SELECT Round(AVG(Price),2) as AverageShipping
FROM Products ;
2)
SELECT Round(AVG(Price),2) as AverageShipping
FROM Products WHERE MONTH= 'JUNE';
3)
SELECT COUNT(ProductID) AS NUMBERPRODUCTS
FROM Products WHERE MANUFATURENAME = 'Manufacturer 154' AND PRODUCTNAME = 'REDCAT';
4)
SELECT MAX(PRICE*QUANTITY) AS LargestItemSales from products
5)
SELECT ProductName, price from products where price in (select Max(price) from Products)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.