query-fbc523ec36fbc15d039cf2b6ac08c8e2
Propertieseducated at (P69)country of citizenship (P27)
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?nationality ?nationalityLabel ?alum ?alumLabel ?alumDescription
WHERE {
?alum wdt:P69 wd:Q459506.
?alum wdt:P27 ?nationality.
MINUS { ?alum wdt:P27 wd:Q145 }
OPTIONAL { ?alum schema:description ?alumDescription FILTER (lang(?alumDescription) = "en").}
OPTIONAL { ?alum rdfs:label ?alumLabel FILTER (lang(?alumLabel) = "en").}
OPTIONAL { ?nationality rdfs:label ?nationalityLabel FILTER (lang(?nationalityLabel) = "en")}
}
ORDER BY ?nationalityLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?alum"):::projected
v3("?alumDescription"):::projected
v2("?alumLabel"):::projected
v5("?nationality"):::projected
v1("?nationalityLabel"):::projected
c5(["wd:Q145"]):::iri
c3(["wd:Q459506"]):::iri
v4 --"wdt:P69"--> c3
v4 --"wdt:P27"--> v5
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v4 --"wdt:P27"--> c5
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:description".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."rdfs:label".-> v2
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."rdfs:label".-> v1
end