query-5295d628a647b0677b81a3bbad68c7e2
Propertiespart of (P361)country (P17)number of cases (P1603)number of deaths (P1120)point in time (P585)
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 ?item ?itemLabel ?dates ?caseNo ?deathNo ?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 .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?country ?dates
Query found at
- https://www.wikidata.org/wiki/Wikidata:WikiProject_COVID-19/Queries
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Humanitarian_Wikidata
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?caseNo"):::projected
v4("?cases")
v1("?country")
v2("?dates"):::projected
v7("?deathNo"):::projected
v6("?deaths")
v3("?item"):::projected
c10(["bd:serviceParam"]):::iri
c2(["wd:Q83741704"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v3 --"p:direct/P361"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P17".-> v1
end
v3 --"p:P1603"--> v4
v4 --"p:statement/P1603"--> v5
v4 --"p:qualifier/P585"--> v2
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:P1120".-> v6
v6 --"p:qualifier/P585"--> v2
v6 --"p:statement/P1120"--> v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end