query-1b5e6b8da142f962aea0697e644c630c
warship entries changed within 1 day
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?change
WHERE {
?item p:P31 ?statement0.
?statement0 (ps:P31/(wdt:P279*)) wd:Q3114762.
?item schema:dateModified ?change .
FILTER(BOUND(?change) && DATATYPE(?change) = xsd:dateTime).
# not in the future, and not more than 1 day ago
BIND(NOW() - ?change AS ?distance).
FILTER(0 <= ?distance && ?distance < 1).
SERVICE wikibase:label { bd:serviceParam wikibase:language "en-gb,en,mul". }
} ORDER BY DESC(?change)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?change"):::projected
v5("?distance")
v3("?item"):::projected
v4("?statement0")
a1((" "))
c12(["en-gb,en,mul"]):::literal
c10(["bd:serviceParam"]):::iri
c7(["wd:Q3114762"]):::iri
f0[["'0^^xsd:integer' <= ?distance?distance < '1^^xsd:integer'"]]
f0 --> v5
f1[["bound(?change)?change = 'xsd:dateTime'"]]
f1 --> v1
v3 --"p:P31"--> v4
v4 --"p:statement/P31"--> a1
a1 --"p:direct/P279"--> c7
v3 --"schema:dateModified"--> v1
bind2[/"NOW() - ?change"/]
v1 --o bind2
bind2 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end