pgsql指定部分字段去重
-- 基于ig.start_pile,ig.end_pile 字段去重
with ete as ( SELECT * from (SELECT ROW_NUMBER() OVER(PARTITION by ig.start_pile,ig.end_pile ORDER BY ig.start_pile asc )idx,ig.* from image_straight ig ) ord where ord.idx = 1 ) SELECT * from ete limit 1