query-bad0db8b1a5e484c059b6edfdd8ff170
Kontrolgraf
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Graph
#defaultView:Graph
PREFIX target: <http://www.wikidata.org/entity/Q818846>
SELECT DISTINCT
?from ?from_image ?fromLabel
?to ?to_image ?toLabel
WHERE {
{
SELECT DISTINCT
?from
WHERE {
{ BIND(target: AS ?from) }
UNION
{ target: (wdt:P169| wdt:P488 | wdt:P1037 | wdt:P3320)? ?from }
UNION
{ target: ( (wdt:P127 | ^wdt:P1830 | wdt:P749 | ^wdt:P355)+ |
(^wdt:P127 | wdt:P1830 | ^wdt:P749 | wdt:P355)+)
/ (wdt:P169 | wdt:P488 | wdt:P1037 | wdt:P3320)?
?from . }
}
} {
SELECT DISTINCT
?to
WHERE {
{ BIND(target: AS ?to) }
UNION
{ target: ( (wdt:P127 | ^wdt:P1830 | wdt:P749 | ^wdt:P355)+ |
(^wdt:P127 | wdt:P1830 | ^wdt:P749 | wdt:P355)+) ?to }
}
} { ?from wdt:P1830 | wdt:P355 ?to . }
UNION
{ ?to wdt:P127 ?from }
UNION
{ ?to wdt:P169 | wdt:P488 | wdt:P1037 | wdt:P3320 ?from }
OPTIONAL { ?from wdt:P18 ?from_image . }
OPTIONAL { ?to wdt:P18 ?to_image . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en" . }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?from"):::projected
v3("?from_image"):::projected
v2("?to"):::projected
v4("?to_image"):::projected
a1((" "))
c1([http://www.wikidata.org/entity/Q818846]):::iri
c12(["bd:serviceParam"]):::iri
c14(["da,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
subgraph union5[" Union "]
subgraph union5l[" "]
style union5l fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P355"--> a1
end
subgraph union5r[" "]
style union5r fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P749"--> c1
end
union5r <== or ==> union5l
end
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P1830"--> a1
end
union4r <== or ==> union4l
end
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P127"--> c1
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
subgraph union6[" Union "]
subgraph union6l[" "]
style union6l fill:#abf,stroke-dasharray: 3 3;
subgraph union7[" Union "]
subgraph union7l[" "]
style union7l fill:#abf,stroke-dasharray: 3 3;
subgraph union8[" Union "]
subgraph union8l[" "]
style union8l fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P355"--> c1
end
subgraph union8r[" "]
style union8r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P749"--> a1
end
union8r <== or ==> union8l
end
end
subgraph union7r[" "]
style union7r fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P1830"--> c1
end
union7r <== or ==> union7l
end
end
subgraph union6r[" "]
style union6r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P127"--> a1
end
union6r <== or ==> union6l
end
end
union2r <== or ==> union2l
end
subgraph union9[" Union "]
subgraph union9l[" "]
style union9l fill:#abf,stroke-dasharray: 3 3;
subgraph union10[" Union "]
subgraph union10l[" "]
style union10l fill:#abf,stroke-dasharray: 3 3;
subgraph union11[" Union "]
subgraph union11l[" "]
style union11l fill:#abf,stroke-dasharray: 3 3;
subgraph union12[" Union "]
subgraph union12l[" "]
style union12l fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P3320"--> v1
end
subgraph union12r[" "]
style union12r fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P1037"--> v1
end
union12r <== or ==> union12l
end
end
subgraph union11r[" "]
style union11r fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P488"--> v1
end
union11r <== or ==> union11l
end
end
subgraph union10r[" "]
style union10r fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P169"--> v1
end
union10r <== or ==> union10l
end
end
subgraph union9r[" "]
style union9r fill:#abf,stroke-dasharray: 3 3;
end
union9r <== or ==> union9l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
subgraph union13[" Union "]
subgraph union13l[" "]
style union13l fill:#abf,stroke-dasharray: 3 3;
subgraph union14[" Union "]
subgraph union14l[" "]
style union14l fill:#abf,stroke-dasharray: 3 3;
subgraph union15[" Union "]
subgraph union15l[" "]
style union15l fill:#abf,stroke-dasharray: 3 3;
subgraph union16[" Union "]
subgraph union16l[" "]
style union16l fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P3320"--> v1
end
subgraph union16r[" "]
style union16r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P1037"--> v1
end
union16r <== or ==> union16l
end
end
subgraph union15r[" "]
style union15r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P488"--> v1
end
union15r <== or ==> union15l
end
end
subgraph union14r[" "]
style union14r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P169"--> v1
end
union14r <== or ==> union14l
end
end
subgraph union13r[" "]
style union13r fill:#abf,stroke-dasharray: 3 3;
end
union13r <== or ==> union13l
end
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
bind0[/"http://www.wikidata.org/entity/Q818846"/]
bind0 --as--o v1
end
union0r <== or ==> union0l
end
subgraph union17[" Union "]
subgraph union17l[" "]
style union17l fill:#abf,stroke-dasharray: 3 3;
subgraph union18[" Union "]
subgraph union18l[" "]
style union18l fill:#abf,stroke-dasharray: 3 3;
subgraph union19[" Union "]
subgraph union19l[" "]
style union19l fill:#abf,stroke-dasharray: 3 3;
subgraph union20[" Union "]
subgraph union20l[" "]
style union20l fill:#abf,stroke-dasharray: 3 3;
subgraph union21[" Union "]
subgraph union21l[" "]
style union21l fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P355"--> v2
end
subgraph union21r[" "]
style union21r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P749"--> c1
end
union21r <== or ==> union21l
end
end
subgraph union20r[" "]
style union20r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P1830"--> v2
end
union20r <== or ==> union20l
end
end
subgraph union19r[" "]
style union19r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P127"--> c1
end
union19r <== or ==> union19l
end
end
subgraph union18r[" "]
style union18r fill:#abf,stroke-dasharray: 3 3;
subgraph union22[" Union "]
subgraph union22l[" "]
style union22l fill:#abf,stroke-dasharray: 3 3;
subgraph union23[" Union "]
subgraph union23l[" "]
style union23l fill:#abf,stroke-dasharray: 3 3;
subgraph union24[" Union "]
subgraph union24l[" "]
style union24l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P355"--> c1
end
subgraph union24r[" "]
style union24r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P749"--> v2
end
union24r <== or ==> union24l
end
end
subgraph union23r[" "]
style union23r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P1830"--> c1
end
union23r <== or ==> union23l
end
end
subgraph union22r[" "]
style union22r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P127"--> v2
end
union22r <== or ==> union22l
end
end
union18r <== or ==> union18l
end
end
subgraph union17r[" "]
style union17r fill:#abf,stroke-dasharray: 3 3;
bind1[/"http://www.wikidata.org/entity/Q818846"/]
bind1 --as--o v2
end
union17r <== or ==> union17l
end
subgraph union25[" Union "]
subgraph union25l[" "]
style union25l fill:#abf,stroke-dasharray: 3 3;
subgraph union26[" Union "]
subgraph union26l[" "]
style union26l fill:#abf,stroke-dasharray: 3 3;
subgraph union27[" Union "]
subgraph union27l[" "]
style union27l fill:#abf,stroke-dasharray: 3 3;
subgraph union28[" Union "]
subgraph union28l[" "]
style union28l fill:#abf,stroke-dasharray: 3 3;
subgraph union29[" Union "]
subgraph union29l[" "]
style union29l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P3320"--> v1
end
subgraph union29r[" "]
style union29r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P1037"--> v1
end
union29r <== or ==> union29l
end
end
subgraph union28r[" "]
style union28r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P488"--> v1
end
union28r <== or ==> union28l
end
end
subgraph union27r[" "]
style union27r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P169"--> v1
end
union27r <== or ==> union27l
end
end
subgraph union26r[" "]
style union26r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P127"--> v1
end
union26r <== or ==> union26l
end
end
subgraph union25r[" "]
style union25r fill:#abf,stroke-dasharray: 3 3;
subgraph union30[" Union "]
subgraph union30l[" "]
style union30l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P355"--> v2
end
subgraph union30r[" "]
style union30r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P1830"--> v2
end
union30r <== or ==> union30l
end
end
union25r <== or ==> union25l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end