query: SELECT DISTINCT ?item { { SELECT ?item WHERE { ?item wdt:P1066 ?item2; p:P569/psv:P569 ?birth1_node . ?birth1_node wikibase:timeValue ?birth1; wikibase:timePrecision "11"^^xsd:integer . ?item2 p:P570/psv:P570 ?death2_node . ?death2_node wikibase:timeValue ?death2; wikibase:timePrecision "11"^^xsd:integer . FILTER (?birth1 > ?death2) } } UNION { SELECT ?item WHERE { ?item wdt:P1066 ?item2; p:P570/psv:P570 ?death1_node . ?death1_node wikibase:timeValue ?death1; wikibase:timePrecision "11"^^xsd:integer . ?item2 p:P569/psv:P569 ?birth2_node . ?birth2_node wikibase:timeValue ?birth2; wikibase:timePrecision "11"^^xsd:integer . FILTER (?birth2 > ?death1) } } }