query: SELECT ?item ?point_in_time ?flag WHERE {
    {?item (wdt:P31/(wdt:P279*)) wd:Q24050099}
    union
    {?item (wdt:P31/(wdt:P279*)) wd:Q56321344;}
     ?item wdt:P585 ?point_in_time.
    FILTER(?point_in_time < (NOW()))
    BIND((NOW()) - ?point_in_time AS ?distance)
    FILTER(?distance < 28 )
    OPTIONAL {
      ?item wdt:P17 ?country.
      ?country wdt:P41 ?flag.
    }
  }
  ORDER BY DESC (?point_in_time)