query-e534fa880bf03d013814abf6df6fcae5
P27 without start/end time propertitesHi, I'm "tidying up" humans from Italy with multiple citizenship values (due to the change in government of 1946), adding P580 and P582... best I could do was this, only to realize that this is getting me only the "unknown values" in P580 and not those who lack the property.
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?human ?humanLabel ?citizenshipLabel ?start WHERE {
?human wdt:P31 wd:Q5;
p:P27 [ps:P27 ?citizenship; pq:P580 ?start]
FILTER isblank (?start)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?citizenship")
v2("?human"):::projected
v1("?start"):::projected
a1((" "))
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;"]):::literal
c2(["wd:Q5"]):::iri
f0[["isBlank(?start)"]]
f0 --> v1
v2 --"p:direct/P31"--> c2
a1 --"p:statement/P27"--> v3
a1 --"p:qualifier/P580"--> v1
v2 --"p:P27"--> a1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end