我有下表代表产品及其属性/属性。我需要编写一个查询来获取为产品value
命名的属性。Insert Style
First Choice Material
Gold
我做到了这一点:
SELECT *
FROM shop_product_properties
WHERE name = 'Insert Size'
AND product_id IN (
SELECT DISTINCT product_id
FROM shop_product_properties
WHERE ((LOWER(name) = 'first choice material'
AND value = 'Aluminium') AND (LOWER(name) = 'insert style' AND value = 'CCGT'))
);