Změňte objednávku na quicklabdumpid DESC
.
WITH cte as(
SELECT ROW_NUMBER() OVER (PARTITION BY [specimen id]
ORDER BY quicklabdumpid DESC ) RN
FROM quicklabdump)
delete from cte where RN>1
Změňte objednávku na quicklabdumpid DESC
.
WITH cte as(
SELECT ROW_NUMBER() OVER (PARTITION BY [specimen id]
ORDER BY quicklabdumpid DESC ) RN
FROM quicklabdump)
delete from cte where RN>1