{ @prefix : <#> . [ a :HappyPerson; schema:identifier :joe ] :during [ :start "2018-08-24T08:00:00Z"^^xsd:dateTime; :end "2018-08-24T12:00:00Z"^^xsd:dateTime ] . [ a :SadPerson; schema:identifier :joe ] :during [ :start "2018-08-24T12:00:00Z"^^xsd:dateTime; :end "2018-08-24T11:60:00Z"^^xsd:dateTime ] . } # State of :joe between # Via SPARQL Inference Rule Template DEFINE get:soft "no-sponge" PREFIX : PREFIX : <#> # CONSTRUCT {?s a ?state} SELECT DISTINCT ?o FROM WHERE { [] a ?o ; :during [:start "2018-08-24T12:00:00Z"^^xsd:dateTime; :end "2018-08-24T11:60:00Z"^^xsd:dateTime] . # ?s schema:identifier ?thing . # ?thing a ?state . # FILTER ( :start = "2018-08-24T12:00:00Z"^^xsd:dateTime and :end = "2018-08-24T11:60:00Z"^^xsd:dateTime ) FILTER (CONTAINS(STR(?o),'Person')) }