what is the {point in time} for {San Marino} has {population} as {20311.0} ?
When did San Marino have a populace of 20311?
When did San Marino have a population of 20311?
SELECT ?r WHERE { ?a property:population ?g . resource:San_Marino property:population ?a . ?a property:point_in_time ?r . FILTER ( CONTAINS ( ?g , '20311.0' ) ) }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q238> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1082> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <20311.0> .
?statement <http://www.wikidata.org/entity/P585> ?value. 
} 

SELECT ?value WHERE { wd:Q238 p:P1082 ?s . ?s ps:P1082 ?x filter(contains(?x , '20311.0')) . ?s pq:P585 ?value}