query-d45834da0ff399544ae1922a6b0eefed

rq turtle/ttl

persons appearing as (voice) actors in both given television shows select distinct ?personLabel where { bind(wd:Q886 as ?show1) . bind(wd:Q79784 as ?show2) .

?ep1 wdt:P179 ?show1. ?ep2 wdt:P179 ?show2. ?ep1 wdt:P31 wd:Q21191270. ?ep2 wdt:P31 wd:Q21191270. ?ep1 wdt:P161|wdt:P725 ?person. ?ep2 wdt:P161|wdt:P725 ?person. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

Use at

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#>
# persons appearing as (voice) actors in both given television shows
select distinct ?personLabel  where
{
  bind(wd:Q886 as ?show1) .
  bind(wd:Q79784 as ?show2) .

  ?ep1 wdt:P179 ?show1.
  ?ep2 wdt:P179 ?show2.
  ?ep1 wdt:P31 wd:Q21191270.
  ?ep2 wdt:P31 wd:Q21191270.
  ?ep1 wdt:P161|wdt:P725 ?person.
  ?ep2 wdt:P161|wdt:P725 ?person.
  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; v3("?ep1") v4("?ep2") v5("?person") v1("?show1") v2("?show2") c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q21191270"]):::iri bind0[/"'wd:Q886'"/] bind0 --as--o v1 bind1[/"'wd:Q79784'"/] bind1 --as--o v2 v3 --"wdt:P179"--> v1 v4 --"wdt:P179"--> v2 v3 --"wdt:P31"--> c3 v4 --"wdt:P31"--> c3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P725"--> v5 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P161"--> v5 end union0r <== or ==> union0l end subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P725"--> v5 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P161"--> v5 end union1r <== or ==> union1l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end