query-b5c6432dc4c18da7baa56748de5a62ab
Schools in the Philippines named after humans/persons SELECT DISTINCT ?item ?itemLabel ?namedAfter ?namedAfterLabel WHERE { ?item wdt:P31 / wdt:P279* wd:Q2385804 . # educational institution ?item wdt:P17 wd:Q928 . # in the Philippines ?item wdt:P138 ?namedAfter . ?namedAfter wdt:P31 wd:Q5 . # is human SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . } }
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 bd: <http://www.bigdata.com/rdf#>
# Schools in the Philippines named after humans/persons
SELECT DISTINCT ?item ?itemLabel ?namedAfter ?namedAfterLabel
WHERE
{
?item wdt:P31 / wdt:P279* wd:Q2385804 . # educational institution
?item wdt:P17 wd:Q928 . # in the Philippines
?item wdt:P138 ?namedAfter .
?namedAfter wdt:P31 wd:Q5 . # is human
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("?item"):::projected
v2("?namedAfter"):::projected
a1((" "))
c3(["wd:Q2385804"]):::iri
c9(["bd:serviceParam"]):::iri
c7(["wd:Q5"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c5(["wd:Q928"]):::iri
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v1 --"wdt:P17"--> c5
v1 --"wdt:P138"--> v2
v2 --"wdt:P31"--> c7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end