There is a table with product characteristics and columns Good_ID , Field_ID , Value . There may be as many records with one Good_ID and different Field_ID and Value .
Field_ID is the identifier of a specific characteristic.
You need to write a query so that Good_ID selected that satisfy several Field_ID and Value pairs. In fact, filtering by the characteristics of the product.
I can not think of how to select from the table all the goods in a table that have a blue color and a weight of up to 1 kg.
Update
Thanks to all. In general, in the end it turned out to be implemented like this
SELECT DISTINCT Good_ID FROM chars WHERE Message_ID IN (SELECT Good_ID FROM chars WHERE Field_ID = 3 AND Value = 'ΡΠ΅ΡΡΠΉ') AND Message_ID IN (SELECT Good_ID FROM chars WHERE Field_ID = 2 AND Value = '3') If I have not correctly composed the request - correct plz.