script SQL :
DELETE
FROM
表名
WHERE
ID IN (
SELECT
ID
FROM
(
SELECT
eol.*,
row_number ( ) over ( partition BY eol.重复的字段名 ORDER BY eol.日期字段 DESC ) rn
FROM
表名 eol
WHERE 条件
)
)
WHERE
rn != 1
)
script SQL :
DELETE
FROM
表名
WHERE
ID IN (
SELECT
ID
FROM
(
SELECT
eol.*,
row_number ( ) over ( partition BY eol.重复的字段名 ORDER BY eol.日期字段 DESC ) rn
FROM
表名 eol
WHERE 条件
)
)
WHERE
rn != 1
)