what is the {point in time} for {Madrid} has {population} as {3.21327e+06} ?
In what year did Madrid have a population of 3.21327e+06?
When did Madrid have a population of 3.21327e+06?
SELECT ?b WHERE { resource:Madrid property:population ?j . FILTER ( ?x = 3.21327e+06 ) . ?j property:population ?x . ?j property:point_in_time ?b }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q2807> .
?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> <3.21327e+06> .
?statement <http://www.wikidata.org/entity/P585> ?value. 
} 

SELECT ?value WHERE { wd:Q2807 p:P1082 ?s . ?s ps:P1082 ?x filter(contains(?x , '3.21327e+06')) . ?s pq:P585 ?value}