A small reminder for myself:
delete t from
(
SELECT *
, DupRank = ROW_NUMBER() OVER (
PARTITION BY PurchaseOrderNumber, LineNumber
ORDER BY (SELECT NULL)
)
FROM [PurchaseOrderLines]
) as t
where DupRank > 1