Mysql
 sql >> Database >  >> RDS >> Mysql

Richiesto consiglio per le query MySQL

Quindi inizia con quello:

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

Quindi introduci una sottoquery:

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