query-7a8d32d68471e25e80f82a6e094b117e

rq turtle/ttl

shelter (Q7493941) / basic architectural structure or building providing protection from the local environment SELECT DISTINCT ?item ?itemLabel ?itemDescription ?countryLabel ?located_in_adm ?coordinate_location ?official_website WHERE { VALUES ?instances_of { wd:Q7493941 } { ?item (p:P31/ps:P31/(wdt:P279*)) ?instances_of. } OPTIONAL { ?item wdt:P17 ?country. } OPTIONAL { ?item wdt:P131 ?located_in_adm. } OPTIONAL { ?item wdt:P625 ?coordinate_location. } OPTIONAL { ?item wdt:P856 ?official_website. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de,fr,ru,es,ja,zh,ar". } } ORDER BY (?countryLabel) (?located_in_adm)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# shelter (Q7493941) / basic architectural structure or building providing protection from the local environment
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?countryLabel ?located_in_adm ?coordinate_location ?official_website WHERE {
  VALUES ?instances_of {
    wd:Q7493941
  }
  { ?item (p:P31/ps:P31/(wdt:P279*)) ?instances_of. }
  OPTIONAL { ?item wdt:P17 ?country. }
  OPTIONAL { ?item wdt:P131 ?located_in_adm. }
  OPTIONAL { ?item wdt:P625 ?coordinate_location. }
  OPTIONAL { ?item wdt:P856 ?official_website. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de,fr,ru,es,ja,zh,ar". }
}
ORDER BY (?countryLabel) (?located_in_adm)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?coordinate_location"):::projected v5("?country") v1("?countryLabel"):::projected v3("?instances_of") v4("?item"):::projected v2("?located_in_adm"):::projected v7("?official_website"):::projected a1((" ")) a2((" ")) c11(["#91;AUTO_LANGUAGE#93;,en,de,fr,ru,es,ja,zh,ar"]):::literal c9(["bd:serviceParam"]):::iri bind0[/VALUES ?instances_of/] bind0-->v3 bind00(["wd:Q7493941"]) bind00 --> bind0 v4 --"p:P31"--> a1 a1 --"p:statement/P31"--> a2 a2 --"p:direct/P279"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P17".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P131".-> v2 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P625".-> v6 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P856".-> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end