query-7154b14bdd3ab99ace313119979904f6
Wikidata property - external ID - group and countA part from a pure list, grouping would be nice, I fail to display the propertyLabels
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?regex (COUNT(?regex) AS ?count)
(GROUP_CONCAT(DISTINCT ?propertyLabel) AS ?propertyLabels)
WHERE {
?property wdt:P31/wdt:P279* wd:Q19847637 .
?property wdt:P1793 ?regex .
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
GROUP BY ?regex
ORDER BY DESC (?count) ?regex ?propertyLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count")
v4("?property")
v3("?propertyLabel"):::projected
v5("?propertyLabels")
v2("?regex"):::projected
a1((" "))
c3(["wd:Q19847637"]):::iri
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
v4 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v4 --"wdt:P1793"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind2[/"count(?regex)"/]
v2 --o bind2
bind2 --as--o v5
bind3[/"?propertyLabel"/]
v3 --o bind3
bind3 --as--o v5