-- Delete duplicate offers (keep only the one with the lowest price per product per feed)
DELETE FROM product_offers po
WHERE po.id NOT IN (
    SELECT DISTINCT ON (po2.product_id, po2.feed_id) po2.id
    FROM product_offers po2
    ORDER BY po2.product_id, po2.feed_id, po2.price ASC
);
