query-1a4a28ea4edcab5ee21b0c62563c3c84

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?COVID19_loc ?COVID19_locLabel ?countryLabel ?cases ?timeC ?recoveries ?timeR 
WHERE
{
   { SELECT ?COVID19_loc ?country ?cases ?timeC ?recoveries ?timeR 
WHERE
{
   { SELECT ?COVID19_loc ?country (MAX(?timeC_) as ?timeC) (MAX(?timeR_) as ?timeR) WHERE 
{
   wd:Q83741704 wdt:P527 ?COVID19_loc.
   ?COVID19_loc wdt:P17 ?country.
   ?country wdt:P30 wd:Q48 .
   ?COVID19_loc p:P1603/pq:P585 ?timeC_ .
   ?COVID19_loc p:P8010/pq:P585 ?timeR_ .
} group by ?COVID19_loc ?country}   ?COVID19_loc p:P1603 ?statC . 
   ?statC ps:P1603 ?cases . 
   ?statC pq:P585 ?timeC.

   ?COVID19_loc p:P8010 ?statR . 
   ?statR ps:P8010 ?recoveries . 
   ?statR pq:P585 ?timeR.
  } }  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?COVID19_loc"):::projected v8("?cases"):::projected v2("?country") v10("?recoveries"):::projected v7("?statC") v9("?statR") v5("?timeC"):::projected v3("?timeC_") v6("?timeR"):::projected v4("?timeR_") a1((" ")) a2((" ")) c1(["wd:Q83741704"]):::iri c14(["en"]):::literal c5(["wd:Q48"]):::iri c12(["bd:serviceParam"]):::iri c1 --"p:direct/P527"--> v1 v1 --"p:direct/P17"--> v2 v2 --"p:direct/P30"--> c5 v1 --"p:P1603"--> a1 a1 --"p:qualifier/P585"--> v3 v1 --"p:P8010"--> a2 a2 --"p:qualifier/P585"--> v4 bind2[/"max(?timeC_)"/] v3 --o bind2 bind2 --as--o v5 bind3[/"max(?timeR_)"/] v4 --o bind3 bind3 --as--o v6 v1 --"p:P1603"--> v7 v7 --"p:statement/P1603"--> v8 v7 --"p:qualifier/P585"--> v5 v1 --"p:P8010"--> v9 v9 --"p:statement/P8010"--> v10 v9 --"p:qualifier/P585"--> v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end