|
@@ -23,7 +23,7 @@
|
|
|
product_spec,
|
|
product_spec,
|
|
|
MAX(unit_price) AS maxPrice,
|
|
MAX(unit_price) AS maxPrice,
|
|
|
MIN(unit_price) AS minPrice,
|
|
MIN(unit_price) AS minPrice,
|
|
|
- SUM(amount),
|
|
|
|
|
|
|
+ SUM(amount) as amount,
|
|
|
ROUND(SUM(unit_price * amount) / SUM(amount), 2) AS avgPrice,
|
|
ROUND(SUM(unit_price * amount) / SUM(amount), 2) AS avgPrice,
|
|
|
ROUND(SUM(unit_price * amount) / 10000, 2) AS salePrice,
|
|
ROUND(SUM(unit_price * amount) / 10000, 2) AS salePrice,
|
|
|
ROUND(100 * SUM(unit_price * amount) / total_sales, 2) AS percent
|
|
ROUND(100 * SUM(unit_price * amount) / total_sales, 2) AS percent
|