|
|
@@ -4,9 +4,9 @@
|
|
|
<select id="findByShopSum" resultType="map">
|
|
|
SELECT
|
|
|
product_name,
|
|
|
- SUM(quantity) AS total_quantity,
|
|
|
- SUM(price) AS total_price,
|
|
|
- ROW_NUMBER() OVER (ORDER BY SUM(quantity) DESC, SUM(price) DESC) AS ranking
|
|
|
+ SUM(opi.quantity) AS total_quantity,
|
|
|
+ SUM(opi.price) AS total_price,
|
|
|
+ ROW_NUMBER() OVER (ORDER BY SUM(opi.quantity) DESC, SUM(opi.price) DESC) AS ranking
|
|
|
FROM nm_order_pro_info opi
|
|
|
JOIN nm_order o ON opi.order_code = o.order_code
|
|
|
JOIN nm_site s ON o.org_code = s.org_code
|