query-a923990945b7656dc3fe5a4a26b6adcd
Artists with unknown dod but properties with end/start time qualifiers to detect life signs 11:14, 26 May 2020 (UTC)) talk (HannolansI want a query that detects humans with any start and end time as qualifier in the properties to detect lifesigns for an artist. For example, I want artists that have a statement residence Amsterdam from 2009 untill 2010. I need this to itereate through such collection to check the lates life sign. Below the query I currently use, it takes all human within museum collections with properties residence and working place. But this still doesnt include the property spouse for example. Also, the collection is too broad as I doesn't include humans without qualifier start/endtime. So instead, I would like to check all humans within collection with start/end time qualifiers for any statement. --
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT DISTINCT ?item ?authorLabel ?timeprecision (YEAR(?dob) as ?year)
WHERE {
?item wdt:P31 wd:Q5 .
?item wdt:P6379 ?collection. #in a collection
# ?item wdt:P6379 wd:Q17153751.
{?item wdt:P937 ?werklocatie}#has a work location
UNION
{?item wdt:P108 ?employer}#or an employer
UNION
{?item wdt:P551 ?woonplaats}#or living place
# ?item wdt:P6379 ?institution .
# ?institution wdt:P17 ?country.# country
# ?country wdt:P463 wd:Q458. # member EU
FILTER NOT EXISTS { ?item wdt:P7763 [] } .#no copyright status
FILTER NOT EXISTS { ?item wdt:P570 [] }. #no dod
FILTER NOT EXISTS { ?item wdt:P1317 [] } .#no floruit
# ?item p:P569/psv:P569 ?timenode.
# ?timenode wikibase:timePrecision ?timeprecision.
# FILTER(?timeprecision > 8) #only year or better precision
}