query-e0e810cc2ec9589cf01c0830fdf665ba

rq turtle/ttl

title: Population totale de la région de l'Øresund

Illustre la fonction d'agrégation SUM

SELECT DISTINCT ?area ?areaLabel (sum(?folkm_ngd) as ?total_folkm) # on peut supprimer les deux premières variables # si on s'intéresse seulement au total WHERE { ?item wdt:P361 wd:Q297853. # est partie de (P361) de la région Øresund (Q297853) ?item wdt:P1082 ?folkm_ngd. # population (P1082) ?area wdt:P31 wd:Q1907114. # est une instance de (P31) la zone métropolitaine (Q1907114) ?area wdt:P527 ?item. # comprend (P527) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". } } GROUP BY ?area ?areaLabel

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Population totale de la région de l'Øresund
# Illustre la fonction d'agrégation SUM

SELECT DISTINCT ?area ?areaLabel (sum(?folkm_ngd) as ?total_folkm) # on peut supprimer les deux premières variables
                                                                   # si on s'intéresse seulement au total
WHERE {
  ?item wdt:P361 wd:Q297853. # est partie de (P361) de la région Øresund (Q297853)
  ?item wdt:P1082 ?folkm_ngd. # population (P1082)
  ?area wdt:P31 wd:Q1907114. # est une instance de (P31) la zone métropolitaine (Q1907114)
  ?area wdt:P527 ?item. # comprend (P527)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
GROUP BY ?area ?areaLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?area"):::projected v2("?folkm_ngd"):::projected v1("?item") v4("?total_folkm") c2(["wd:Q297853"]):::iri c5(["wd:Q1907114"]):::iri c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal v1 --"wdt:P361"--> c2 v1 --"wdt:P1082"--> v2 v3 --"wdt:P31"--> c5 v3 --"wdt:P527"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind1[/"sum(?folkm_ngd)"/] v2 --o bind1 bind1 --as--o v4