query-4d08b4cafd3d58ea29669b821ba8a5a0

rq turtle/ttl

actors born in kerala whose father is also an actor SELECT ?son ?sonLabel ?father ?fatherLabel ?birthplaceLabel WHERE { ?son wdt:P31 wd:Q5; wdt:P106 wd:Q33999; wdt:P22 ?father. ?father wdt:P106 wd:Q33999. ?son wdt:P19 ?birthplace. ?birthplace wdt:P131/wdt:P131* wd:Q1186. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en language }

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#>
#actors born in kerala whose father is also an actor
SELECT ?son ?sonLabel ?father ?fatherLabel ?birthplaceLabel
WHERE 
{
  ?son wdt:P31 wd:Q5;
       wdt:P106 wd:Q33999;
       wdt:P22 ?father.
  ?father wdt:P106 wd:Q33999.
  ?son wdt:P19 ?birthplace.
  ?birthplace wdt:P131/wdt:P131* wd:Q1186.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en language
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?birthplace") v2("?father"):::projected v1("?son"):::projected a1((" ")) c10(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c8(["wd:Q1186"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q33999"]):::iri v1 --"wdt:P31"--> c2 v1 --"wdt:P106"--> c4 v1 --"wdt:P22"--> v2 v2 --"wdt:P106"--> c4 v1 --"wdt:P19"--> v3 v3 --"wdt:P131"--> a1 a1 --"wdt:P131"--> c8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end