query-fde738bc2c2ad17d54e7e2fd96b9fabb

rq turtle/ttl

2002 events in Tokyo 15:00, 13 January 2018 (UTC)) talk (WolboHi, I am looking for a list of events that took place in the municipality of Tokyo in 2002.--Initial results are not good...

Use at

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#>
SELECT ?item ?itemLabel ?when ?when2 WHERE {
  ?item wdt:P31/wdt:P279* wd:Q1656682. #item is an event or subclass of an event
  ?item wdt:P131 wd:Q1490.             #located in the administrative territorial entity of Tokyo prefecture
  ?item wdt:P585 ?when.                #It has a 'point in time' statement
  BIND(year(?when) as ?when2)          #from which we extract the year
  filter(?when2=2002)                  #and filter for 2002
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v3("?when"):::projected v4("?when2"):::projected a1((" ")) c9(["bd:serviceParam"]):::iri c6(["wd:Q1490"]):::iri c11(["#91;AUTO_LANGUAGE#93;"]):::literal c4(["wd:Q1656682"]):::iri f0[["?when2 = '2002^^xsd:integer'"]] f0 --> v4 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 v2 --"wdt:P131"--> c6 v2 --"wdt:P585"--> v3 bind1[/"year-from-dateTime(?when)"/] v3 --o bind1 bind1 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end