query-75dd11ecb65c031222eaad178bcf1f1a
Consultes SPARQL sobre centres docentsInstituts Educ Sec a Catalunya
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#>
SELECT ?centre ?centreLabel ?llocLabel ?ubiseuLabel ?muniLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,gl,es,en,as". }
# Institut de Catalunya
?centre (wdt:P31/(wdt:P279*)) wd:Q50359544.
# possible localitzat a entitat territorial administrativa
OPTIONAL { ?centre wdt:P131 ?lloc. }
# possible ubicat a
OPTIONAL { ?centre wdt:P159 ?ubiseu.
# potser ubicat a un carrer o plaça (potser hi faltaria alguna altra cosa)
OPTIONAL { ?ubiseu wdt:P31 wd:Q79007 .
?ubiseu wdt:P31 wd:Q174782 .
?ubiseu wdt:P131 ?muni . }
# potser ubicat a un municipi de Catalunya
OPTIONAL { ?ubiseu wdt:P31 wd:Q33146843 . }
}
}
ORDER BY (?llocLabel)
LIMIT 1000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?centre"):::projected
v3("?lloc")
v1("?llocLabel"):::projected
v5("?muni")
v4("?ubiseu")
a1((" "))
c7(["wd:Q50359544"]):::iri
c11(["wd:Q174782"]):::iri
c2(["bd:serviceParam"]):::iri
c10(["wd:Q79007"]):::iri
c12(["wd:Q33146843"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,ca,gl,es,en,as"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P131".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P159".-> v4
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P31".-> c10
v4 --"wdt:P31"--> c11
v4 --"wdt:P131"--> v5
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P31".-> c12
end
end