Query
I want the another solution of result found using below mentioned query
SELECT
products.ProductId,
options.*,
GROUP_CONCAT(CONCAT_WS('-',options.OptionGroupID, options.OptionName)) as properties
FROM
products
INNER JOIN
productoptions on products.ProductID = productoptions.ProductID
INNER JOIN
options ON options.OptionID = productoptions.OptionID
GROUP BY
ProductId
HAVING
properties LIKE '%1-red%' AND properties LIKE '%2-S%';