sql - Select rows as column -


 name  | value  | product_id  -------+--------+------------  color | red    |          9  style | modern |          9  brand | xxx    |          1  color | blue   |          4  color | red    |          1 

how select product ids, brand = xxx , color = red? product id=1.

select product_id tbl "name"='color' , "value"='red' intersect select product_id tbl "name"='brand' , "value"='xxx'; 

Comments

Popular posts from this blog

r - Trouble relying on third party package imports in my package -

Payment information shows nothing in one page checkout page magento -