what is the {location} for {Joseph Raymond McCarthy} has {educated at} as {primary school} ?
Which is the {area} for {Joseph Raymond McCarthy} where {taught at} as {essential school} ?
which is the {location} for {Joseph Raymond McCarthy} where {educated at} as {primary school} ?
SELECT ?t WHERE { ?a property:location ?t . ?a property:educated_at resource:primary_school . resource:Joseph_McCarthy property:educated_at ?a }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q189197> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P69> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q9842> .
?statement <http://www.wikidata.org/entity/P276> ?value. 
} 

SELECT ?value WHERE { wd:Q189197 p:P69 ?s . ?s ps:P69 wd:Q9842 . ?s pq:P276 ?value}