query-6d4edd79729b606304b4eeb8c56e3a14
Population des pays voisins de l'Allemagne SELECT ?year ?population ?countryLabel WHERE { { SELECT ?country ?year (AVG(?population) AS ?population) WHERE { { SELECT ?country (YEAR(?date) AS ?year) ?population WHERE { ?country wdt:P47 wd:Q183. ?country p:P1082 ?populationStatement. ?populationStatement ps:P1082 ?population. ?populationStatement pq:P585 ?date. FILTER(year(?date)>=1900) . #FILTER( ?country not in (wd:Q1201)). } } } GROUP BY ?country ?year } SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". } }
Use at
- https://query.wikidata.org/sparql
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Population des pays voisins de l'Allemagne
SELECT ?year ?population ?countryLabel WHERE {
{
SELECT ?country ?year (AVG(?population) AS ?population) WHERE {
{ SELECT ?country (YEAR(?date) AS ?year) ?population WHERE {
?country wdt:P47 wd:Q183.
?country p:P1082 ?populationStatement.
?populationStatement ps:P1082 ?population.
?populationStatement pq:P585 ?date.
FILTER(year(?date)>=1900) .
#FILTER( ?country not in (wd:Q1201)).
} }
}
GROUP BY ?country ?year
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
}
Query found at
- https://www.wikidata.org/wiki/Template_talk:SPARQL
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/02