query-7e4431f086ce1dcf36bfa1edbd20ecec
Propertiesinstance of (P31)subclass of (P279)located in the administrative territorial entity (P131)country (P17)end time (P582)
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?university ?city ?cityLabel WHERE {
?university (wdt:P31/wdt:P279*) wd:Q38723.
?university wdt:P131 ?city.
?city wdt:P17 wd:Q800.
FILTER (?city = wd:Q3070 ).
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
OPTIONAL { }
FILTER(NOT EXISTS { ?statement pq:P582 ?university. })
}
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?city"):::projected
v1("?statement")
v2("?university"):::projected
a1((" "))
c10(["bd:serviceParam"]):::iri
c8(["wd:Q800"]):::iri
c12(["en"]):::literal
c5(["wd:Q38723"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"pq:P582"--> e0v2
e0v1("?statement"):::projected
e0v2("?university"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --"pq:P582"--> v2
f1[["?city = 'wd:Q3070'"]]
f1 --> v3
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
v2 --"wdt:P131"--> v3
v3 --"wdt:P17"--> c8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
end