query-045a876c61c4f04af9db8e97bc8eabcf
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 ?country ?countryLabel ?cases ?recoveries ?date ?sick_people
WHERE
{
wd:Q83873577 wdt:P17 ?country.
wd:Q83873577 p:P1603 ?casesstatement.
?casesstatement a wikibase:BestRank.
?casesstatement ps:P1603 ?cases.
wd:Q83873577 p:P8010 ?recoveries_statement.
?recoveries_statement a wikibase:BestRank.
?recoveries_statement ps:P8010 ?recoveries.
?casesstatement pq:P585 ?date. # The date
?recoveries_statement pq:P585 ?date. # The same date again
BIND (?cases - ?recoveries AS ?sick_people)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?cases"):::projected
v2("?casesstatement")
v1("?country"):::projected
v6("?date"):::projected
v5("?recoveries"):::projected
v4("?recoveries_statement")
v7("?sick_people"):::projected
c5(["wikibase:BestRank"]):::iri
c1(["wd:Q83873577"]):::iri
c11(["bd:serviceParam"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c1 --"p:direct/P17"--> v1
c1 --"p:P1603"--> v2
v2 --"a"--> c5
v2 --"p:statement/P1603"--> v3
c1 --"p:P8010"--> v4
v4 --"a"--> c5
v4 --"p:statement/P8010"--> v5
v2 --"p:qualifier/P585"--> v6
v4 --"p:qualifier/P585"--> v6
bind0[/"?cases - ?recoveries"/]
v3 --o bind0
v5 --o bind0
bind0 --as--o v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end