What is the {specialty} for {health specialty} of {pedophilia}
What is pedophilia?
What is pedophilia?
SELECT DISTINCT ?g WHERE { resource:pedophilia property:health_specialty ?g . ?g rdf:type ontology:specialty }
select distinct ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q8388> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1995> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj . ?obj <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q1047113> } 
 select distinct ?obj where { wd:Q8388 wdt:P1995 ?obj . ?obj wdt:P31 wd:Q1047113 } 