query-f4b62c67f6aacc4c8c91b751509c377e

rq turtle/ttl

Masies del Vallès Oriental SELECT DISTINCT ?masiaLabel ?munLabel ?coor ?article ?masia WHERE { ?masia wdt:P31 wd:Q585956. ?masia wdt:P131* wd:Q14303. ?masia wdt:P131 ?mun. OPTIONAL {?masia wdt:P625 ?coor} OPTIONAL { ?article schema:about ?masia. ?article schema:isPartOf https://ca.wikipedia.org/. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,en,es" . } } ORDER BY ASC(?mun)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Masies del Vallès Oriental
SELECT DISTINCT ?masiaLabel ?munLabel ?coor ?article ?masia 
WHERE {
  ?masia wdt:P31 wd:Q585956.
  ?masia wdt:P131* wd:Q14303.
  ?masia wdt:P131 ?mun.
  OPTIONAL {?masia wdt:P625 ?coor}
  OPTIONAL {
    ?article schema:about ?masia.
    ?article schema:isPartOf <https://ca.wikipedia.org/>.
  }
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,en,es" . } 
}
ORDER BY ASC(?mun)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?article"):::projected v3("?coor"):::projected v2("?masia"):::projected v1("?mun") c2(["wd:Q585956"]):::iri c10(["bd:serviceParam"]):::iri c8([https://ca.wikipedia.org/]):::iri c4(["wd:Q14303"]):::iri c12(["#91;AUTO_LANGUAGE#93;,ca,en,es"]):::literal v2 --"wdt:P31"--> c2 v2 --"wdt:P131"--> c4 v2 --"wdt:P131"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P625".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."schema:about".-> v2 v4 --"schema:isPartOf"--> c8 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end