query-6b9ee8ce6b09b1e4dd4f1d7ce1676146
Depictions in the Khalili Falnamah
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#>
#defaultView:Graph
SELECT ?from ?fromLabel ?image1 ?to ?toLabel ?image2 ?edgeLabel
WHERE {
{
?from wdt:P361 wd:Q107663675.
wd:Q107663675 wdt:P18 ?image2.
BIND(wd:Q107663675 AS ?to)
BIND("part of" as ?edgeLabel)
OPTIONAL{?from wdt:P18 ?image1}
}
UNION { ?from wdt:P361 wd:Q107663675; wdt:P180 ?to. # depiction
BIND("depicts" as ?edgeLabel)
OPTIONAL{?from wdt:P18 ?image1}
}
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;
v6("?edgeLabel"):::projected
v1("?from"):::projected
v5("?image1"):::projected
v2("?image2"):::projected
v3("?to"):::projected
c2(["wd:Q107663675"]):::iri
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P361"--> c2
v1 --"wdt:P180"--> v3
bind0[/"'depicts'"/]
bind0 --as--o v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v5
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P361"--> c2
c2 --"wdt:P18"--> v2
bind1[/"'wd:Q107663675'"/]
bind1 --as--o v3
bind2[/"'part of'"/]
bind2 --as--o v6
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v5
end
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end