query-5dcf92b7702333321e21a3a8bebb85a8
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT (COUNT(DISTINCT(?stmt)) AS ?count) ?reason ?reasonLabel WHERE {
?item wdt:P4327 [] .
?item p:P1144 ?stmt .
?stmt pq:P2241 ?reason
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?reason ?reasonLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?count")
v1("?item")
v3("?reason"):::projected
v2("?stmt"):::projected
a1((" "))
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:direct/P4327"--> a1
v1 --"p:P1144"--> v2
v2 --"p:qualifier/P2241"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
bind1[/"count(?stmt)"/]
v2 --o bind1
bind1 --as--o v4