query-7a2d3c99bc7850fa2b8111b2f895d1a7
Find a person SELECT ?person ?personLabel ?film1Label ?film2Label WHERE { # Auntie Mame BIND(wd:Q1219582 AS ?film1) . # The Big Sleep BIND(wd:Q221462 AS ?film2) .
# cast member ?film1 wdt:P161 ?person . ?film2 wdt:P161 ?person .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } }
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#>
# Find a person
SELECT ?person ?personLabel ?film1Label ?film2Label WHERE {
# Auntie Mame
BIND(wd:Q1219582 AS ?film1) .
# The Big Sleep
BIND(wd:Q221462 AS ?film2) .
# cast member
?film1 wdt:P161 ?person .
?film2 wdt:P161 ?person .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?film1")
v2("?film2")
v3("?person"):::projected
c3(["bd:serviceParam"]):::iri
c5(["en"]):::literal
bind0[/"'wd:Q1219582'"/]
bind0 --as--o v1
bind1[/"'wd:Q221462'"/]
bind1 --as--o v2
v1 --"wdt:P161"--> v3
v2 --"wdt:P161"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end