Mysql
 sql >> Datenbank >  >> RDS >> Mysql

MySQL-Abfrageberatung erforderlich

Beginnen Sie also damit:

SELECT * 
FROM shop_product_properties
WHERE name = 'Insert Style';

Führen Sie dann eine Unterabfrage ein:

SELECT * 
FROM shop_product_properties
WHERE name = 'Insert Style'
AND product_id IN (
    SELECT DISTINCT product_id
    FROM shop_product_properties
    WHERE name = 'First Choice Material'
    AND value = 'Gold'
);

http://sqlfiddle.com/#!2/ecfb4/1