How do I output the duplicates with a certain pk in postgre?

There is a table. Need from a web muzzle Django to pass volumio_id. For example volumio_id=[6,7, 2] and shows me the total record for these ajtishnikam. In this case name= "11_You_Wish.mp3". You need to look at the name.
Need help constructing a query that I could pass ajtishniki, and in response received a total song. Or how to do it through the Djano ORM
March 23rd 20 at 19:38
1 answer
March 23rd 20 at 19:40
SELECT 1 as id,, string_agg(CAST(volo_files.volumio_id AS TEXT), ', ') AS volumio_ids, count( as cnt
from volo_files
where volumio_id in %s
HAVING count( > 1

Made here such request

Find more questions by tags DjangoPostgreSQL