prefix bio: prefix foaf: prefix time: prefix xsd: prefix ex: prefix thing: select ?nameBefore ?nameAfter where { ?pBefore a ex:ResidenceContext . ?pBefore ex:individual thing:anon . ?pBefore ex:place ?placeBefore . ?placeBefore foaf:name ?nameBefore . ?pBefore time:intervalContains ?dateBefore . filter (xsd:integer(?dateBefore) <= 1874) . ?pAfter a ex:ResidenceContext . ?pAfter ex:individual thing:anon . ?pAfter ex:place ?placeAfter . ?placeAfter foaf:name ?nameAfter . ?pAfter time:intervalContains ?dateAfter . filter (xsd:integer(?dateAfter) > 1874) . ?pBefore time:intervalBefore ?pAfter . }