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