query-23b37c7b3af8fce8d8b57506c7e54688
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#>
#defaultView:Graph#defaultView:Graph
SELECT ?doctor ?doctorMaster ?doctorLabel ?doctorMasterLabel ?docimage WHERE {
{ ?root (wdt:P184*) ?doctor. } union {?root wdt:P185/wdt:P185?/wdt:P185?/wdt:P185? ?doctor .}
?doctor wdt:P184 ?doctorMaster.
optional {?doctor wdt:P18 ?docimage }
VALUES ?root {
wd:Q7604
}
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;
v4("?docimage"):::projected
v2("?doctor"):::projected
v3("?doctorMaster"):::projected
v5("?root")
a1((" "))
a2((" "))
a3((" "))
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v5 --"wdt:P185"--> a1
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P185"--> a2
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
end
union1r <== or ==> union1l
end
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
a2 --"wdt:P185"--> a3
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
end
union2r <== or ==> union2l
end
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
a3 --"wdt:P185"--> v2
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
end
union3r <== or ==> union3l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v5 --"wdt:P184"--> v2
end
union0r <== or ==> union0l
end
v2 --"wdt:P184"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v4
end
bind0[/VALUES ?root/]
bind0-->v5
bind00(["wd:Q7604"])
bind00 --> bind0
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end