当我运行此查询时,我得到更多行,然后在没有 ROW_NUMBER () 行的情况下进行查询:
SELECT DISTINCT id, value,
ROW_NUMBER () over (partition by (id) ORDER BY value desc NULLS LAST ) max
FROM TABLE1
WHERE id like '%1260' ORDER BY id ASC
VS
SELECT DISTINCT id, value
FROM TABLE1
WHERE id like '%1260' ORDER BY id ASC
为什么会发生以及如何解决?