query-e0a882646c6d78af1c54c36d24044c1f
Hannolans"I want a query that detects humans with any start and end time as qualifier in the properties to detect lifesigns for an artist."
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 pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?claim ?start ?startprecision
WHERE {
?item wdt:P31 wd:Q5.
?item wdt:P6379 wd:Q17153751.
# Get any truthy statements for ?item with P580 as qualifier.
?item ?claim ?statement.
?statement a wikibase:BestRank.
?statement pqv:P580 ?startnode.
?startnode wikibase:timePrecision ?startprecision.
?startnode wikibase:timeValue ?start.
FILTER (?startprecision > 8) #only year or better precision
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],es,en". }
}
limit 5
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?claim"):::projected
v2("?item"):::projected
v6("?start"):::projected
v5("?startnode")
v1("?startprecision"):::projected
v4("?statement")
c7(["wikibase:BestRank"]):::iri
c12(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
c5(["wd:Q17153751"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,es,en"]):::literal
f0[["?startprecision > '8^^xsd:integer'"]]
f0 --> v1
v2 --"wdt:P31"--> c3
v2 --"wdt:P6379"--> c5
v2 -->v3--> v4
v4 --"a"--> c7
v4 --"pqv:P580"--> v5
v5 --"wikibase:timePrecision"--> v1
v5 --"wikibase:timeValue"--> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end