query: SELECT ?grouping (COUNT(DISTINCT ?entity) as ?count) (SAMPLE(?entity) as ?sample) WHERE { ?entity wdt:P31*/wdt:P279 wd:Q7075; wdt:P17 wd:Q408. ?entity wdt:P131/wdt:P131*/wdt:P300/^wdt:P300 ?grouping .} GROUP BY ?grouping HAVING (?count >= 2) ORDER BY DESC(?count) LIMIT 1000