query-6a3c53129695d4c0a9d5a4e937549951

rq turtle/ttl

TODO

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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?article ?itemLabel_bo
WHERE 
{
  ?item wdt:P131 wd:Q745302.                  # ?item is located within the administrative areas Saga County
  {?item wdt:P31/wdt:P279* wd:Q486972 . }     # ?item is a human settlement or a subclass of a human settlement
  UNION                                       # or
  {?item wdt:P31 wd:Q1500350 . }              # item is a township of the People's Republic of China
  optional {?item rdfs:label ?itemLabel_bo . 
            filter(lang(?itemLabel_bo)="bo")} # may have a BO label
  optional { ?article schema:about ?item ;    # may have a BO article
          schema:isPartOf <https://bo.wikipedia.org/> .}                                                    
  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; v3("?article"):::projected v2("?item"):::projected v1("?itemLabel_bo"):::projected a1((" ")) c3(["wd:Q745302"]):::iri c11([https://bo.wikipedia.org/]):::iri c7(["wd:Q1500350"]):::iri c6(["wd:Q486972"]):::iri c13(["bd:serviceParam"]):::iri c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P131"--> c3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c7 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c6 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."rdfs:label".-> v1 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."schema:about".-> v2 v3 --"schema:isPartOf"--> c11 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end