Display qualifier value as column and display only a single unique item

Viewed 27

I am trying to get some municipalities and their population (P1082) over the years using SPARQL in Wikidata. The query I am using works, but I do not know how to convert the years of the population figures into columns, so that I only have a single unique item. The structure I would want to be returned in the query is:

place    placeLabel  1815 1830 1840 ... 2019  2020  parentPlaceLabel
wd:Q9908 Bloemendaal 1458 1748 2058 ... 23410       Q101626200
wd:Q9928 Heemstede   2186 2227 2332 ... 27286 27234 Q101626200

I have been reading about BIND but find it difficult to adapt it to the code since the code I am using gets all the population point in time (P585) qualifier values.

0 Answers
Related