query: SELECT ?grouping (COUNT(DISTINCT ?entity) as ?count) (SAMPLE(?entity) as ?sample) WHERE { ?entity wdt:P31 wd:Q21562164. ?entity wdt:P131+ ?grouping . FILTER EXISTS { ?grouping wdt:P31 wd:Q24698 } ?dummy ^wdt:P988 ?grouping .} GROUP BY ?grouping HAVING (?count >= 1) ORDER BY DESC(?count) LIMIT 1000