query-7ad15ed466522f9e29a466de55020c7c
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 bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel ?item2 ?item2Label ?relation_to_subjectLabel ?relation_to_objectLabel
WHERE
{
VALUES ?item {wd:Q81960}
{ ?item2 wdt:P26| wdt:P40 | wdt:P3373 | wdt:P22 | wdt:P25 ?item .
?item2 ?propertyRel ?item .
?relation_to_subject wikibase:directClaim ?propertyRel.
}
union
{ ?item wdt:P26 | wdt:P40 | wdt:P3373 | wdt:P22 | wdt:P25 ?item2 .
?item ?propertyRel ?item2 .
?relation_to_object wikibase:directClaim ?propertyRel.
}
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("?item"):::projected
v2("?item2"):::projected
v3("?propertyRel")
v5("?relation_to_object")
v4("?relation_to_subject")
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?item/]
bind0-->v1
bind00(["wd:Q81960"])
bind00 --> bind0
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;
v1 --"wdt:P25"--> v2
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P22"--> v2
end
union4r <== or ==> union4l
end
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P3373"--> v2
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P40"--> v2
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P26"--> v2
end
union1r <== or ==> union1l
end
v1 -->v3--> v2
v5 --"wikibase:directClaim"--> v3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
subgraph union5[" Union "]
subgraph union5l[" "]
style union5l 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;
v2 --"wdt:P25"--> v1
end
subgraph union8r[" "]
style union8r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P22"--> v1
end
union8r <== or ==> union8l
end
end
subgraph union7r[" "]
style union7r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P3373"--> v1
end
union7r <== or ==> union7l
end
end
subgraph union6r[" "]
style union6r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P40"--> v1
end
union6r <== or ==> union6l
end
end
subgraph union5r[" "]
style union5r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P26"--> v1
end
union5r <== or ==> union5l
end
v2 -->v3--> v1
v4 --"wikibase:directClaim"--> v3
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end