-- Blacklist week 3 and 4 batches (UK and NL for all product groups)

-- From 000.432:
-- Week 3 ref3 = 'ugPF92'
-- Week 4 ref3 = '1xKnvR'

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 in ('ugPF92', '1xKnvR')
    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 in ('ugPF92', '1xKnvR')
    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 in ('ugPF92', '1xKnvR')
    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 in ('ugPF92', '1xKnvR')
    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 in ('ugPF92', '1xKnvR')
    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 in ('ugPF92', '1xKnvR')
    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 in ('ugPF92', '1xKnvR')
    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 in ('ugPF92', '1xKnvR')
    ON CONFLICT DO NOTHING;
