query: SELECT ?item (count(distinct(?cast)) as ?ct) WHERE { VALUES ?filmtype {wd:Q11424 wd:Q24862 wd:Q20667187 wd:Q226730} . ?item wdt:P31 ?filmtype . ?item wdt:P161 ?cast . } GROUP BY ?item ORDER BY DESC(?ct) LIMIT 12