首先,试图做到的是:
查阅<代码>etp_product.price和option_price
。
SELECT
etp_product.product_id,
etp_product.price,
(SELECT MIN(price) AS FIELD_2 FROM etp_product_option_value pov WHERE pov.product_id = etp_product.product_id) AS option_price
FROM
etp_product
GROUP BY
etp_product.product_id,
etp_product.price
我试图这样做:
SELECT
etp_product.product_id,
etp_product.price,
(SELECT MIN(price) AS FIELD_2 FROM etp_product_option_value pov WHERE pov.product_id = etp_product.product_id) AS option_price,
SUM(etp_product.price + option_price) AS Total
FROM
etp_product
GROUP BY
etp_product.product_id,
etp_product.price
但得出这一错误:
未知列栏 外地清单价格
如何做到这一点?