-- Blacklist week 5 batch (UK and NL for all product groups)

-- From 000.432:
-- Week 5 ref3 = 'M7E1Bn'

INSERT INTO product_blacklist (product_id, group_id, market_id)
    SELECT productid, 1, (select id from markets where name = 'NL') FROM "product-products" WHERE ref3 = 'M7E1Bn'
    ON CONFLICT DO NOTHING;
INSERT INTO product_blacklist (product_id, group_id, market_id)
    SELECT productid, 2, (select id from markets where name = 'NL') FROM "product-products" WHERE ref3 = 'M7E1Bn'
    ON CONFLICT DO NOTHING;
INSERT INTO product_blacklist (product_id, group_id, market_id)
    SELECT productid, 3, (select id from markets where name = 'NL') FROM "product-products" WHERE ref3 = 'M7E1Bn'
    ON CONFLICT DO NOTHING;
INSERT INTO product_blacklist (product_id, group_id, market_id)
    SELECT productid, 7, (select id from markets where name = 'NL') FROM "product-products" WHERE ref3 = 'M7E1Bn'
    ON CONFLICT DO NOTHING;
INSERT INTO product_blacklist (product_id, group_id, market_id)
    SELECT productid, 1, (select id from markets where name = 'GB') FROM "product-products" WHERE ref3 = 'M7E1Bn'
    ON CONFLICT DO NOTHING;
INSERT INTO product_blacklist (product_id, group_id, market_id)
    SELECT productid, 2, (select id from markets where name = 'GB') FROM "product-products" WHERE ref3 = 'M7E1Bn'
    ON CONFLICT DO NOTHING;
INSERT INTO product_blacklist (product_id, group_id, market_id)
    SELECT productid, 3, (select id from markets where name = 'GB') FROM "product-products" WHERE ref3 = 'M7E1Bn'
    ON CONFLICT DO NOTHING;
INSERT INTO product_blacklist (product_id, group_id, market_id)
    SELECT productid, 7, (select id from markets where name = 'GB') FROM "product-products" WHERE ref3 = 'M7E1Bn'
    ON CONFLICT DO NOTHING;
