query: SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) (SAMPLE(?entity) as ?sample) WHERE { ?entity wdt:P31 wd:Q615980. ?entity wdt:P131 ?grouping. OPTIONAL { ?grouping wdt:P17/wdt:P298  ?_higher_grouping } } GROUP BY ?grouping HAVING (?count > 20) ORDER BY DESC(?count) LIMIT 1000