query-27b62cce00ef0f481e820294cb93153d
title: Batailles ayant lieu avant l'an -500 SELECT DISTINCT ?item ?itemLabel ?date ?starttime ?endtime ?geo ?location WHERE { ?item wdt:P31 wd:Q178561. OPTIONAL { ?item wdt:P585 ?date } . OPTIONAL { ?item wdt:P580 ?starttime } . OPTIONAL { ?item wdt:P582 ?endtime } . OPTIONAL { ?item wdt:P625 ?geo } . OPTIONAL { ?item wdt:P276/wdt:P625 ?location } . FILTER ( YEAR(?date) < -500 ) . SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }
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 bd: <http://www.bigdata.com/rdf#>
#title: Batailles ayant lieu avant l'an -500
SELECT DISTINCT ?item ?itemLabel ?date ?starttime ?endtime ?geo ?location WHERE
{
?item wdt:P31 wd:Q178561.
OPTIONAL { ?item wdt:P585 ?date } .
OPTIONAL { ?item wdt:P580 ?starttime } .
OPTIONAL { ?item wdt:P582 ?endtime } .
OPTIONAL { ?item wdt:P625 ?geo } .
OPTIONAL { ?item wdt:P276/wdt:P625 ?location } .
FILTER ( YEAR(?date) < -500 ) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?date"):::projected
v4("?endtime"):::projected
v5("?geo"):::projected
v2("?item"):::projected
v6("?location"):::projected
v3("?starttime"):::projected
a1((" "))
c10(["bd:serviceParam"]):::iri
c3(["wd:Q178561"]):::iri
c12(["en"]):::literal
f0[["year-from-dateTime(?date) < '-500^^xsd:integer'"]]
f0 --> v1
v2 --"wdt:P31"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P585".-> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P580".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P582".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P625".-> v5
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P276".-> a1
a1 --"wdt:P625"--> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end