query: #City and town info
  
  SELECT 
    ?item 
    ?itemLabel
    ?fips_code
    ?population
    ?population_date 
    ?population_methodLabel
  
  WHERE 
  {
    ?item p:P31/ps:P31/wdt:P279* wd:Q1093829 . # cities
    ?county wdt:P131 wd:Q1261 . # where the county is in colorado
    ?item wdt:P131 wd:Q113029 . # and in boulder county
  
    ?item wdt:P131 ?county . #  county
    ?county wdt:P131 ?state . # state
    
    OPTIONAL {
      ?item p:P1082 ?population_statement.
      ?population_statement ps:P1082 ?population.
      ?population_statement pq:P585 ?population_date.
      ?population_statement pq:P459 ?population_method.
    }
    
    FILTER NOT EXISTS {
      ?item p:P1082/pq:P585 ?population_date_2 .
      FILTER (?population_date_2 > ?population_date)
    }
    
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } # Helps get the label in your language, if not, then en language
  }
  
  
  