query-22e008f47896827d621df3915bb67e39
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel
WHERE
{
?item wdt:P31 wd:Q1248784 .
?item p:P3872 ?statement .
?statement pq:P585 ?value.
FILTER("2016-12-31"^^xsd:date < ?value && "2018-00-00"^^xsd:date > ?value)
minus {
?item p:P3872 ?statement2 .
?statement2 pq:P585 ?value2.
FILTER ("2017-12-31"^^xsd:date < ?value2 && "2019-00-00"^^xsd:date > ?value2)
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v3("?statement")
v5("?statement2")
v1("?value")
v4("?value2")
c4(["wd:Q1248784"]):::iri
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["'2016-12-31^^xsd:date' < ?value'2018-00-00^^xsd:date' > ?value"]]
f0 --> v1
v2 --"p:direct/P31"--> c4
v2 --"p:P3872"--> v3
v3 --"p:qualifier/P585"--> v1
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
f2[["'2017-12-31^^xsd:date' < ?value2'2019-00-00^^xsd:date' > ?value2"]]
f2 --> v4
v2 --"p:P3872"--> v5
v5 --"p:qualifier/P585"--> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end