Question: When did San Marino have a population of 20311?
SPARQL (Wikidata): SELECT ?value WHERE { wd:Q238 p:P1082 ?s . ?s ps:P1082 ?x filter(contains(?x,'20311.0')) . ?s pq:P585 ?value}