query-adc867abaf2d64ec6562a95516a0cbae
Battles where the county wasn't extant at the timeChanges made on 2nd Feb 2024
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?country ?poi ?min_inception ?max_dissolved WHERE
{
{
SELECT ?item ?country (MIN(?inception) as ?min_inception) (MAX(?dissolved) as ?max_dissolved) WHERE
{
?item wdt:P31/wdt:P279* wd:Q178561. # battle
?item schema:dateModified ?date .
FILTER("2024-02-02"^^xsd:date <= ?date &&
?date < "2024-02-03"^^xsd:dat)
?item wdt:P17 ?country.
?country wdt:P571 ?inception.
?country wdt:P576 ?dissolved.
} GROUP BY ?item ?country } ?item wdt:P585 ?poi.
FILTER (?poi - ?max_dissolved > 600|| ?poi - ?min_inception < -600)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en-gb,en,mul". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?country"):::projected
v4("?date")
v8("?dissolved")
v7("?inception")
v5("?item"):::projected
v9("?max_dissolved"):::projected
v9("?min_inception"):::projected
v1("?poi"):::projected
a1((" "))
c16(["en-gb,en,mul"]):::literal
c14(["bd:serviceParam"]):::iri
c7(["wd:Q178561"]):::iri
f0[["(?poi - ?max_dissolved > '600^^xsd:integer' || ?poi - ?min_inception < '-600^^xsd:integer')"]]
f0 --> v1
f0 --> v9
f0 --> v9
f1[["'2024-02-02^^xsd:date' <= ?date?date < s2024-02-03^^<http://www.w3.org/2001/XMLSchema#dat>'"]]
f1 --> v4
v5 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c7
v5 --"schema:dateModified"--> v4
v5 --"wdt:P17"--> v6
v6 --"wdt:P571"--> v7
v6 --"wdt:P576"--> v8
bind4[/"min(?inception)"/]
v7 --o bind4
bind4 --as--o v9
bind5[/"max(?dissolved)"/]
v8 --o bind5
bind5 --as--o v9
v5 --"wdt:P585"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c16
end