query: SELECT DISTINCT ?commune ?INSEE_municipality_code ?date WHERE {
    ?commune wdt:P31 wd:Q484170.
    ?commune p:P1082 ?populationStatement .
          ?populationStatement    ps:P1082 ?population
       ; wikibase:rank wikibase:PreferredRank 
          ; pq:P585 ?date .
    MINUS { ?commune (wdt:P576|wdt:P582) ?end. }
    FILTER (YEAR(?date) = 2017)
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE] en". }
    OPTIONAL { ?commune wdt:P374 ?INSEE_municipality_code}
  }
  ORDER BY ASC(?INSEE_municipality_code)
  