query-c5d2ba6006250e96f4f4ada22f58b600
Map of institutions where Canadian citizens got their PhD
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT DISTINCT ?institution ?institutionLabel ?academics ?academicsLabel ?degree ?degreeLabel ?geoloc ?image WHERE {
?academics wdt:P31 wd:Q5 ; # instances (P31) of humans (Q5)
wdt:P27 wd:Q16 ; # country of citizenship
p:P69 ?statement . # check for an "educated at" (P69) statement
OPTIONAL { ?academics wdt:P18 ?image }. #image
?statement ps:P69 ?institution . # get value of the "educated at" statement, i.e. the institution
?institution wdt:P625 ?geoloc . # get the geolocation of the institution
?statement pq:P512 ?degree . # get qualifier "academic degree" (P512)
?degree wdt:P31*/wdt:P279* wd:Q849697 . # filter for doctoral degrees
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?academics"):::projected
v6("?degree"):::projected
v5("?geoloc"):::projected
v3("?image"):::projected
v4("?institution"):::projected
v2("?statement")
a1((" "))
c4(["wd:Q16"]):::iri
c13(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c11(["wd:Q849697"]):::iri
v1 --"p:direct/P31"--> c2
v1 --"p:direct/P27"--> c4
v1 --"p:P69"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P18".-> v3
end
v2 --"p:statement/P69"--> v4
v4 --"p:direct/P625"--> v5
v2 --"p:qualifier/P512"--> v6
v6 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c11
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end