query-2f1651a393a6f731b9d03aa45bfc62da
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#>
#created by Mahir256
#defaultView:LineChart
SELECT ?state ?time_new ?newdeaths ?stateLabel {
{ SELECT ?state ?time_new ?case_old ?case_new {
wd:Q84055514 wdt:P527 ?statecases.
?statecases wdt:P276 ?state ; p:P1120 ?casestmt1 ; p:P1120 ?casestmt2.
?casestmt1 ps:P1120 ?case_old ; pq:P585 ?time_old.
?casestmt2 ps:P1120 ?case_new ; pq:P585 ?time_new.
FILTER(?time_new - ?time_old = 1.0)
} ORDER BY ?state ?time_new }
BIND(?case_new - ?case_old as ?newdeaths)
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;
v8("?case_new")
v7("?case_old")
v5("?casestmt1")
v6("?casestmt2")
v9("?newdeaths"):::projected
v1("?state"):::projected
v4("?statecases")
v2("?time_new"):::projected
v3("?time_old")
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q84055514"]):::iri
f0[["?time_new - ?time_old = '1.0^^xsd:decimal'"]]
f0 --> v2
f0 --> v3
c2 --"p:direct/P527"--> v4
v4 --"p:direct/P276"--> v1
v4 --"p:P1120"--> v5
v4 --"p:P1120"--> v6
v5 --"p:statement/P1120"--> v7
v5 --"p:qualifier/P585"--> v3
v6 --"p:statement/P1120"--> v8
v6 --"p:qualifier/P585"--> v2
bind1[/"?case_new - ?case_old"/]
v8 --o bind1
v7 --o bind1
bind1 --as--o v9
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end