query-ff7ba687d83669d18c991331600279b0
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 ?outbreak ?outbreakLabel ?countryLabel
WHERE {?outbreak p:P31 ?x.
?x ps:P31 ?y.
?y wdt:P279* wd:Q3241045. # ?outbreak is an instance of (P31) disease outbreak (Q3241045) or its subclass (P279)
?x pq:P642 wd:Q84263196; # of (P642) COVID-19 (Q84263196).
VALUES ?qualifier {pq:P518 pq:P3005}
?x ?qualifier ?country. # applies to part (P518) or valid in place (P3005): ?country
?country wdt:P31 wd:Q3624078 # ?country is an instance of (P31) sovereign state (Q3624078)
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;
v5("?country")
v1("?outbreak"):::projected
v4("?qualifier")
v2("?x")
v3("?y")
c6(["wd:Q84263196"]):::iri
c4(["wd:Q3241045"]):::iri
c8(["wd:Q3624078"]):::iri
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:P31"--> v2
v2 --"p:statement/P31"--> v3
v3 --"p:direct/P279"--> c4
v2 --"p:qualifier/P642"--> c6
bind0[/VALUES ?qualifier/]
bind0-->v4
bind00(["p:qualifier/P518"])
bind00 --> bind0
bind01(["p:qualifier/P3005"])
bind01 --> bind0
v2 -->v4--> v5
v5 --"p:direct/P31"--> c8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end