I'm trying to build a query that returns events that have two named participants. The names of these participants are specified using values for the first name and last name. So far, this is the only working solution I have been able to come up with:
SELECT ?event
WHERE {
?event con:hasParticipant ?personA .
?personA con:hasFirstName "Bob"^^xsd:string .
?personA con:hasLastName "Smith"^^xsd:string .
?event con:hasParticipant ?personB .
?personB con:hasFirstName "The"^^xsd:string .
?personB con:hasLastName "Bear"^^xsd:string .
}
...but I'm wondering if there is a better way of doing this?
Any help would be greatly appreciated!