使用id字段开窗(也可以多个字段,但是any函数和arry函数需要替换)
select * from gatherdata.temp_zyr_export_1 a where a.linkid = any(array ( select linkid from ( select row_number() over (partition by linkid), linkid from gatherdata.temp_zyr_export_1 ) t where t.row_number > 1 ));
标签:postger,函数,linkid,number,开窗,select,表内 From: https://www.cnblogs.com/zyanrong/p/17620336.html