query-9de9903928e2a00f90867e899ae89c5d
Extended graph of the three main COVID items and the statements for which they are the subject
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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#PREFIX target: <http://www.wikidata.org/entity/Q40878>
#defaultView:Graph
SELECT ?node ?nodeLabel ?nodeImage ?childNode ?childNodeLabel ?childNodeImage ?rgb
WHERE {
{
{
SELECT DISTINCT ?node ?childNode WHERE {
VALUES ?node { wd:Q84263196 wd:Q81068910 wd:Q82069695 }
# BIND(target: AS ?node)
?node ?p ?i.
?childNode ?x ?p.
?childNode rdf:type wikibase:Property.
FILTER(STRSTARTS(STR(?i), "http://www.wikidata.org/entity/Q"))
FILTER(STRSTARTS(STR(?childNode), "http://www.wikidata.org/entity/P"))
}
LIMIT 5000
} }
UNION
{
{
SELECT DISTINCT ?childNode ?node ?rgb WHERE {
BIND("EFFBD8" AS ?rgb)
VALUES ?target { wd:Q84263196 wd:Q81068910 wd:Q82069695 }
?target ?p ?childNode.
?node ?x ?p.
?node rdf:type wikibase:Property.
FILTER(STRSTARTS(STR(?childNode), "http://www.wikidata.org/entity/Q"))
}
LIMIT 5000
} }
OPTIONAL {
{
SELECT DISTINCT ?property WHERE {
?property a wikibase:Property;
wdt:P31 wd:Q18610173 ;
wdt:P31 wd:Q26940804 .
}
} ?property wikibase:directClaim ?nodeclaim.
?node ?nodeclaim ?nodeImage.
}
OPTIONAL {
{
SELECT DISTINCT ?property WHERE {
?property a wikibase:Property;
wdt:P31 wd:Q18610173 ;
wdt:P31 wd:Q26940804 .
}
} ?property wikibase:directClaim ?childNodeclaim.
?childNode ?childNodeclaim ?childNodeImage.
}
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;
v1("?childNode"):::projected
v12("?childNodeImage"):::projected
v11("?childNodeclaim")
v2("?i")
v3("?node"):::projected
v10("?nodeImage"):::projected
v9("?nodeclaim")
v4("?p")
v8("?property")
v6("?rgb"):::projected
v7("?target")
v5("?x")
c10(["bd:serviceParam"]):::iri
c4(["wikibase:Property"]):::iri
c7(["wd:Q26940804"]):::iri
c6(["wd:Q18610173"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
f0[["starts-with(str(?childNode),'http://www.wikidata.org/entity/Q')"]]
f0 --> v1
bind1[/"'EFFBD8'"/]
bind1 --as--o v6
bind2[/VALUES ?target/]
bind2-->v7
bind20(["wd:Q84263196"])
bind20 --> bind2
bind21(["wd:Q81068910"])
bind21 --> bind2
bind22(["wd:Q82069695"])
bind22 --> bind2
v7 -->v4--> v1
v3 -->v5--> v4
v3 --"a"--> c4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
f3[["starts-with(str(?childNode),'http://www.wikidata.org/entity/P')"]]
f3 --> v1
f4[["starts-with(str(?i),'http://www.wikidata.org/entity/Q')"]]
f4 --> v2
bind5[/VALUES ?node/]
bind5-->v3
bind50(["wd:Q84263196"])
bind50 --> bind5
bind51(["wd:Q81068910"])
bind51 --> bind5
bind52(["wd:Q82069695"])
bind52 --> bind5
v3 -->v4--> v2
v1 -->v5--> v4
v1 --"a"--> c4
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v8 -."a".-> c4
v8 --"wdt:P31"--> c6
v8 --"wdt:P31"--> c7
v8 --"wikibase:directClaim"--> v9
v3 -->v9--> v10
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v8 -."a".-> c4
v8 --"wdt:P31"--> c6
v8 --"wdt:P31"--> c7
v8 --"wikibase:directClaim"--> v11
v1 -->v11--> v12
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end