query: SELECT ?item ?itemLabel ?dates ?testsNo ?caseNo ?deathNo ?recoverNo ?countryLabel WHERE { 
    ?item wdt:P361 wd:Q83741704 .
    OPTIONAL { ?item wdt:P17 ?country . }
    ?item p:P1603 ?cases .
    ?cases ps:P1603 ?caseNo ;
           pq:P585 ?dates .
    OPTIONAL{ ?item p:P1120 ?deaths .
    ?deaths pq:P585 ?dates ;
            ps:P1120 ?deathNo .
    }
    OPTIONAL{ ?item p:P8010 ?recovered .
    ?recovered pq:P585 ?dates ;
            ps:P8010 ?recoverNo .
    }
    OPTIONAL{ ?item p:P8011 ?tests .
    ?tests pq:P585 ?dates ;
            ps:P1561 ?testsNo .
    }
    filter not exists {
    {?item p:P1603/pq:P585 ?dates2 .}UNION
    {?item p:P1120/pq:P585 ?dates2 .}
    filter (?dates2 > ?dates)
    }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } 
  }
  ORDER BY ?dates
  #limit 10