query-af75604fa29c799a3ff850690cfd4c25

rq turtle/ttl

requête communes

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#>
SELECT DISTINCT ?itemLabel  ?item ?IHSI_ID ?abréviation ?appartenanceLabel  (?area as ?aire) ?population WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fr". }
  {
    SELECT DISTINCT ?item WHERE {
      ?item p:P31 ?statement0.
      ?statement0 (ps:P31/(wdt:P279*)) wd:Q3685462.
    }
    LIMIT 100
  }
  OPTIONAL { ?item wdt:P1448 ?official_name. }
  OPTIONAL { ?item wdt:P1813 ?abréviation. }
  OPTIONAL { ?item wdt:P1370 ?IHSI_ID. }
  # OPTIONAL { ?item wdt:P131 ?appartenance. } à retirer car ça crée des doublons d'entités
  OPTIONAL { ?item wdt:P2046 ?area. }
  OPTIONAL { ?item wdt:P1082 ?population. }
  }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?IHSI_ID"):::projected v4("?abréviation"):::projected v8("?aire") v6("?area"):::projected v1("?item"):::projected v3("?official_name") v7("?population"):::projected v2("?statement0") a1((" ")) c8(["wd:Q3685462"]):::iri c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,fr"]):::literal subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"p:P31"--> v2 v2 --"p:statement/P31"--> a1 a1 --"p:direct/P279"--> c8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P1448".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P1813".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P1370".-> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P2046".-> v6 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P1082".-> v7 end bind0[/"?area"/] v6 --o bind0 bind0 --as--o v8