-- Delete duplicate offers (same product + same URL), keep the one with lowest id
DELETE FROM product_offers WHERE id IN (
  SELECT po2.id FROM product_offers po1
  JOIN product_offers po2 ON po1.product_id = po2.product_id 
    AND po1.product_url = po2.product_url 
    AND po1.id < po2.id
);
