query-0db48254253847bd7e1c9f8ed641d176

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel (group_concat(distinct ?typeLabel) as ?type_label)
WHERE 
{
  ?item wdt:P31/wdt:P279* wd:Q1656682. #the item is an event or a subclass of an event
  ?item wdt:P31 ?type.                 #get the type of the event
  ?type rdfs:label ?typeLabel. filter(lang(?typeLabel)="en") #and the label for the type of event
  ?item wdt:P276 wd:Q84.               #item is located in London
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } #get labels
} group by ?item ?itemLabel            #we group because an event item might have several P31 values

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v3("?type") v1("?typeLabel"):::projected v4("?type_label") a1((" ")) c9(["bd:serviceParam"]):::iri c7(["wd:Q84"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q1656682"]):::iri f0[["?typeLabel = 'en'"]] f0 --> v1 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 v2 --"wdt:P31"--> v3 v3 --"rdfs:label"--> v1 v2 --"wdt:P276"--> c7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end bind2[/"?typeLabel"/] v1 --o bind2 bind2 --as--o v4