📅  最后修改于: 2022-03-11 15:04:51.909000             🧑  作者: Mango
WITH hashes AS
(SELECT group,
SUM(Ora_hash(Concat(Concat(account,field), value))) AS hash
FROM table
GROUP BY group)
SELECT account,
field,
value,
group
FROM table
WHERE group IN (SELECT group
FROM (SELECT group,
row_number() over (PARTITION BY hash ORDER BY NULL) AS rn
FROM hashes)
WHERE rn = 1);