query-eee302f5a72c9614da8aa34d47f3819f

rq turtle/ttl

Montagnes des Collines de l'Oka SELECT DISTINCT ?item ?itemLabel ?typeLabel ?massifLabel ?altitude ?localisationLabel ?coord WHERE { ?item (wdt:P4552) wd:Q9195483 . ?item wdt:P31 ?type . ?item wdt:P4552 ?massif . OPTIONAL {?item p:P2044 ?alt_statement . ?alt_statement psv:P2044 ?alt_node . ?alt_node wikibase:quantityAmount ?alt .
?alt_node wikibase:quantityUnit ?unit . ?unit wdt:P2370 ?conversionSI . BIND(ROUND(?alt
?conversionSI) AS ?altitude)} OPTIONAL { ?item wdt:P131 ?localisation } OPTIONAL { ?item wdt:P625 ?coord } . SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" . } # français sinon anglais } ORDER BY (?massifLabel) LIMIT 1000

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Montagnes des Collines de l'Oka
SELECT DISTINCT ?item ?itemLabel ?typeLabel ?massifLabel ?altitude ?localisationLabel ?coord 
  WHERE { ?item (wdt:P4552)* wd:Q9195483 .
          ?item wdt:P31 ?type .
          ?item wdt:P4552 ?massif .
          OPTIONAL {?item p:P2044 ?alt_statement .
              ?alt_statement psv:P2044 ?alt_node .
              ?alt_node wikibase:quantityAmount ?alt .  
              ?alt_node wikibase:quantityUnit ?unit .
              ?unit wdt:P2370 ?conversionSI . 
              BIND(ROUND(?alt*?conversionSI) AS ?altitude)} 
          OPTIONAL { ?item wdt:P131 ?localisation }
          OPTIONAL { ?item wdt:P625 ?coord } .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" . }  # français sinon anglais
}
ORDER BY (?massifLabel) 
LIMIT 1000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?alt") v6("?alt_node") v5("?alt_statement") v10("?altitude"):::projected v9("?conversionSI") v12("?coord"):::projected v2("?item"):::projected v11("?localisation") v4("?massif") v1("?massifLabel"):::projected v3("?type") v8("?unit") c2(["wd:Q9195483"]):::iri c12(["bd:serviceParam"]):::iri c14(["fr,en"]):::literal v2 --"p:direct/P4552"--> c2 v2 --"p:direct/P31"--> v3 v2 --"p:direct/P4552"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:P2044".-> v5 v5 --"p:statement/value/P2044"--> v6 v6 --"wikibase:quantityAmount"--> v7 v6 --"wikibase:quantityUnit"--> v8 v8 --"p:direct/P2370"--> v9 bind0[/"numeric-round(?alt * ?conversionSI)"/] v7 --o bind0 v9 --o bind0 bind0 --as--o v10 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P131".-> v11 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P625".-> v12 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end