Intersection in SPARQL

Hi all.

I wonder how I can get an intersection in SPARQL.

Here is the use case:
In DBPedia, there is a predicate called <http://dbpedia.org/property/actor>.

In this triple pattern:
?s <http://dbpedia.org/property/actor> ?actor . ?actor a ?typeOfActor

?typeOfActor can be:

http://www.w3.org/2002/07/owl#Thing
http://schema.org/Person
http://xmlns.com/foaf/0.1/Person
http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Agent
http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#NaturalPerson
http://wikidata.dbpedia.org/resource/Q215627
http://wikidata.dbpedia.org/resource/Q5
http://dbpedia.org/ontology/Agent
http://dbpedia.org/ontology/Person
http://dbpedia.org/class/yago/Actor109765278
http://dbpedia.org/class/yago/ActorsFromLiverpool
http://dbpedia.org/class/yago/Adult109605289
http://dbpedia.org/class/yago/CausalAgent100007347
http://dbpedia.org/class/yago/Educator110045713
http://dbpedia.org/class/yago/Entertainer109616922
http://dbpedia.org/class/yago/LivingThing100004258
http://dbpedia.org/class/yago/Object100002684
http://dbpedia.org/class/yago/Organism100004475
http://dbpedia.org/class/yago/Performer110415638
http://dbpedia.org/class/yago/Person100007846
http://dbpedia.org/class/yago/Professional110480253
http://dbpedia.org/class/yago/Teacher110694258
http://dbpedia.org/class/yago/Whole100003553
http://dbpedia.org/class/yago/YagoLegalActorGeo

My need is to retrieve only the ?typeOfActor that are common to all
the ?actor(s).

I still have no clue how to do that in SPARQL.

Any help would be very welcome.

(and any strategy to do that in SPARQL 1.0 would be interesting too)

Received on Wednesday, 8 July 2015 14:44:37 UTC