query-bce8b7ddae55e865783eeb0d1926dcad

rq turtle/ttl

(In which I jot down the main things I'm up to in Wikidata land every day, as much as a memory aide for myself as anything, but also in the hope that someone, somewhere, will find something in it useful at some point.) instead (I did similar runs for "presidential election", "parliamentary election", "legislative election", "gubernatorial election", and "by-election" yesterday): (Q152450)municipal election , and set that to (Q40231)public election of (P31)instance of run of the day: Find all items with an English label containing "municipal election", but only have a QuickStatementsFirst big

Use at

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#>
SELECT DISTINCT ?item ?itemLabel WHERE {
  ?item wdt:P31 wd:Q40231.
  ?item rdfs:label ?itemLabel.
  FILTER((LANG(?itemLabel)) = "en")
  FILTER(CONTAINS(LCASE(?itemLabel), "municipal election"))
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?itemLabel"):::projected c4(["wd:Q40231"]):::iri f0[["contains(lower-case(?itemLabel),'municipal election')"]] f0 --> v1 f1[["?itemLabel = 'en'"]] f1 --> v1 v2 --"wdt:P31"--> c4 v2 --"rdfs:label"--> v1