query-8cc68503c37702592690b726761dbe74
TODO
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?refType (count(*) as ?refTypeCnt) WHERE {
?item wdt:P31 wd:Q4164871 .
?item p:P31 ?inst.
?inst ps:P31 wd:Q4164871;
prov:wasDerivedFrom ?ref.
?ref ?refType ?reference.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} group by (?refType)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?inst")
v1("?item")
v3("?ref")
v4("?refType"):::projected
v6("?refTypeCnt")
v5("?reference")
c7(["bd:serviceParam"]):::iri
c2(["wd:Q4164871"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:direct/P31"--> c2
v1 --"p:P31"--> v2
v2 --"p:statement/P31"--> c2
v2 --"prov:wasDerivedFrom"--> v3
v3 -->v4--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind1[/"count(*)"/]
bind1 --as--o v6