query: SELECT DISTINCT ?comune ?comuneLabel WHERE {
    ?item wdt:P131* wd:Q38 . 
    ?item wdt:P131 ?comune .
    ?item wdt:P2186 ?wlmid .
    MINUS { ?item p:P2186 [ pq:P582 ?end ] .
    FILTER ( ?end <= "2018-09-01T00:00:00+00:00"^^xsd:dateTime ) } .
    FILTER REGEX( str(?item), "5(4[89]|5[123456])[0-9]{5}" ) .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "it" . }
  }
  GROUP BY ?comune ?comuneLabel