-- P5-7027: blacklist products on CA based on US delete from product_blacklist where market_id = (select id from markets where name = 'CA'); INSERT INTO product_blacklist (product_id, group_id, market_id) SELECT product_id, group_id, (select id from markets where name = 'CA') FROM product_blacklist where market_id = (select id from markets where name = 'US');