UNWIND $keys AS id MATCH (gsr:GlobalSoundRecording { id: id }) OPTIONAL MATCH (gsr)-[:REPRESENTS]->(:LabelSoundRecording)<-[:IS_PLACEMENT_OF]-(:Track:Orchard)<-[i:INCLUDES]-(p:Product:Orchard)<-[:INCLUDES]-(pr:Project)-[:BELONGS_TO]->(label:Label) WHERE p.contextType = "digital" AND p.notForDistribution IN $parameters.nfdFilter AND COALESCE(label.labelIdentifier, "") <> "D3" WITH id, label, COUNT(p) AS product_count ORDER BY id, product_count DESC, label.name RETURN id, collect(DISTINCT label.uuid)