I want to find the AccountId that is most of times used as Duplicate Record Item. I tried
select id, count(RecordId) from DuplicateRecordItem group by RecordId
but i get
MALFORMED_QUERY: select id, count(RecordId) ^ ERROR at Row:1:Column:18 Grouped field should not be aggregated: RecordId
What is the correct query ?