SELECT 1 as id, volo_files.name, string_agg(CAST(volo_files.volumio_id AS TEXT), ', ') AS volumio_ids, count(volo_files.name) as cnt
from volo_files
where volumio_id in %s
GROUP BY volo_files.name
HAVING count(volo_files.name) > 1
Сделал вот такой запрос