query-097363474aac52880c1df7601452b716
Propertiesauthor (P50)number of cases (P1603)number of deaths (P1120)stated in (P248)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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:LineChart
SELECT ?date (MAX(?count) AS ?max_count) ?measureLabel
WHERE {
BIND(wd:Q81068910 AS ?outbreak).
{
BIND(wd:Q166231 AS ?measure).
?outbreak p:P1603 ?cases.
?cases prov:wasDerivedFrom/pr:P248/wdt:P50 wd:Q7817.
?cases pqv:P585/wikibase:timeValue ?date.
?cases psv:P1603/wikibase:quantityAmount ?count.
?cases psv:P1603/wikibase:quantityAmount ?infection_count.
} UNION {
BIND(wd:Q4 AS ?measure).
?outbreak p:P1120 ?deaths.
?deaths prov:wasDerivedFrom/pr:P248/wdt:P50 wd:Q7817.
?deaths pqv:P585/wikibase:timeValue ?date.
?deaths psv:P1120/wikibase:quantityAmount ?count.
?deaths psv:P1120/wikibase:quantityAmount ?death_count.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?date ?measureLabel
ORDER BY ASC(?date) DESC(?measure)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?cases")
v5("?count"):::projected
v1("?date"):::projected
v8("?death_count")
v7("?deaths")
v6("?infection_count")
v9("?max_count")
v7("?measure")
v3("?outbreak")
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
a6((" "))
a7((" "))
a8((" "))
a9((" "))
a10((" "))
c5(["wd:Q7817"]):::iri
c13(["bd:serviceParam"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/"'wd:Q81068910'"/]
bind0 --as--o v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
bind1[/"'wd:Q4'"/]
bind1 --as--o v7
v3 --"p:P1120"--> v7
v7 --"prov:wasDerivedFrom"--> a6
a6 --"p:reference/P248"--> a7
a7 --"p:direct/P50"--> c5
v7 --"p:qualifier/value/P585"--> a8
a8 --"wikibase:timeValue"--> v1
v7 --"p:statement/value/P1120"--> a9
a9 --"wikibase:quantityAmount"--> v5
v7 --"p:statement/value/P1120"--> a10
a10 --"wikibase:quantityAmount"--> v8
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
bind2[/"'wd:Q166231'"/]
bind2 --as--o v7
v3 --"p:P1603"--> v4
v4 --"prov:wasDerivedFrom"--> a1
a1 --"p:reference/P248"--> a2
a2 --"p:direct/P50"--> c5
v4 --"p:qualifier/value/P585"--> a3
a3 --"wikibase:timeValue"--> v1
v4 --"p:statement/value/P1603"--> a4
a4 --"wikibase:quantityAmount"--> v5
v4 --"p:statement/value/P1603"--> a5
a5 --"wikibase:quantityAmount"--> v6
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end
bind4[/"max(?count)"/]
v5 --o bind4
bind4 --as--o v9