query-386ae637053e3619ce74a90d99ab45bb
Property path problem…
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 schema: <http://schema.org/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item (COUNT(DISTINCT ?sitelink) as ?articlecount) WHERE {
?item wdt:P570 ?deathdate;
wdt:P31 wd:Q5 .
FILTER (YEAR(?deathdate)=1945) .
?sitelink schema:about ?item .
VALUES ?allowedRank { wikibase:NormalRank wikibase:PreferredRank } .
?item p:P106 ?occupationStatement .
?occupationStatement ps:P106/wdt:P279* wd:Q2500638;
wikibase:rank ?allowedRank .
} GROUP BY ?item ORDER BY DESC (?articlecount)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?allowedRank")
v7("?articlecount")
v2("?deathdate")
v3("?item"):::projected
v6("?occupationStatement")
v4("?sitelink"):::projected
a1((" "))
c9(["wd:Q2500638"]):::iri
c4(["wd:Q5"]):::iri
f0[["year-from-dateTime(?deathdate) = '1945^^xsd:integer'"]]
f0 --> v2
v3 --"p:direct/P570"--> v2
v3 --"p:direct/P31"--> c4
v4 --"schema:about"--> v3
bind1[/VALUES ?allowedRank/]
bind1-->v5
bind10(["wikibase:NormalRank"])
bind10 --> bind1
bind11(["wikibase:PreferredRank"])
bind11 --> bind1
v3 --"p:P106"--> v6
v6 --"p:statement/P106"--> a1
a1 --"p:direct/P279"--> c9
v6 --"wikibase:rank"--> v5
bind3[/"count(?sitelink)"/]
v4 --o bind3
bind3 --as--o v7