UPDATE dataset d
SET d.price =
(SELECT TOP 1 price FROM dataset d1 WHERE
d.good_id=d1.good_id AND d.owner_id=d1.owner_id AND d1.price IS NOT NULL AND
d1.year_id<=d.year_id AND d1.week_number<=d.week_number
ORDER BY d1.year_id DESC, d1.week_number DESC)
WHERE d.price IS NULL