I'm trying to get the document keys for all entries that have duplicate values for a particular field.
I have this query to find the duplicates:
SELECT t1.somefield, t1.fieldcount FROM
(SELECT somefield, fieldcount FROM `mybucket` WHERE `somefield` IS NOT MISSING GROUP BY somefield
LETTING fieldcount = COUNT(somefield) ) as t1
WHERE t1.fieldcount > 1;
and need to get the META().id for each result. Can I do this in a single query?