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
Post a Comment