query-c313d51a28e29a9ecb7a01a5e0760008
. Then you know that the events are (hopefully) carefully selected by Wikipedia users:en:Timeline of Japanese historyWell, you could simply list all events linked to in the page 14:02, 1 August 2022 (UTC) 2001:610:450:40:0:0:0:1035 https://en.wikipedia.org/wiki/Timeline_of_Japanese_historyEvents could be very broad (sports, concerts, natural disasters, elections, inflation, pandemics, inventions, product releases etc), so I understand it is not easy to list them all in a nice way, but I have a feeling that Wikidata does not define the classification of events very intuitively. Still, my question was what would be a reasonable query which has a nice balance between recall and precision to gain an overview of important historical events for a country (or city), just like the way how Wikidata/Wikipedia lists all important relevant information about a country or city (i.e. wd:Q17). In short, I would say something like the following Wikipage would be very nice: Ok, thank you for your prompt reply. I thought it is enough to say I would like to see entities whose type is event in general. My first impression was that historical events (wd:Q13418847) could be enough to see a wide range of events interesting for historical research, but the query above returns a few hundreds events which has date information, which is not enough. In addition, I wonder if this entity focuses too much on war events.Dipsacus fullonum@ 11:27, 1 August 2022 (UTC)) talk (Dipsacus fullonumPlease define which historical events you want in the list. On this page we can help with SPARQL queries but you have to describe what they should do. I can't know what you want in the list. --
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?event ?eventLabel ?time ?begin ?end ?create ?destroy WHERE {
VALUES ?city { wd:Q1490 }.
VALUES ?startTime {"1990-12-31"^^xsd:dat}.
{?event wdt:P131* ?city.} UNION {?event wdt:P276 ?city.}
# ?event wdt:P31/wdt:P279* wd:Q1190554. (anyway timesout)
{?event p:P276 ?statement.
?statement pqv:P580 ?beginvalue;
pqv:P582 ?endvalue;
ps:P276 ?city.
?beginvalue wikibase:timeValue ?begin .
?endvalue wikibase:timeValue ?end .
FILTER("1990-12-31"^^xsd:date < ?begin && ?begin < "2020-00-00"^^xsd:dat||
"1990-12-31"^^xsd:date < ?end && ?end < "2020-00-00"^^xsd:dat)
}
UNION
{ ?event wdt:P585 ?time.
FILTER("1990-12-31"^^xsd:date < ?time && ?time < "2020-00-00"^^xsd:dat)
}
UNION
{ ?event wdt:P580 ?begin;
wdt:P582 ?end.
FILTER("1990-12-31"^^xsd:date < ?begin && ?begin < "2020-00-00"^^xsd:date ||
"1990-12-31"^^xsd:date < ?end && ?end < "2020-00-00"^^xsd:dat)
}
UNION
{ ?event wdt:P571 ?create;
wdt:P576 ?destroy;
FILTER("1990-12-31"^^xsd:date < ?create && ?create < "2020-00-00"^^xsd:date ||
"1990-12-31"^^xsd:date < ?destroy && ?destroy < "2020-00-00"^^xsd:dat)
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}