query-fa9267d8f4cf9422d186bc37e3ebce69
TODO
Use at
- https://query.wikidata.org/sparql
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 ?COVID19_loc ?COVID19_locLabel ?countryLabel ?coord ?cases ?dateC ?recoveries ?dateR ?deaths ?dateD
WHERE
{
{ SELECT ?COVID19_loc ?country
(SAMPLE(?cases_) as ?cases) (SAMPLE(?timeC) as ?dateC)
(SAMPLE(?recoveries_) as ?recoveries) (SAMPLE(?timeR) as ?dateR)
(SAMPLE(?deaths_) as ?deaths) (SAMPLE(?timeD) as ?dateD) WHERE
{
{ { SELECT ?COVID19_loc ?country ?recoveries_ ?timeR WHERE
{
INCLUDE %dates
?COVID19_loc p:P8010 ?statR .
?statR ps:P8010 ?recoveries_ .
?statR pq:P585 ?timeR .
} }}
UNION
{ { SELECT ?COVID19_loc ?country ?cases_ ?timeC WHERE
{
INCLUDE %dates
?COVID19_loc p:P1603 ?statC .
?statC ps:P1603 ?cases_ .
?statC pq:P585 ?timeC .
} }}
UNION
{ { SELECT ?COVID19_loc ?country ?deaths_ ?timeD WHERE
{
INCLUDE %dates
?COVID19_loc p:P1120 ?statD .
?statD ps:P1120 ?deaths_ .
?statD pq:P585 ?timeD .
} }}
} group by ?COVID19_loc ?country } OPTIONAL {?country wdt:P625 ?coord. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}