User:PAC2/Elections
Jump to navigation
Jump to search
Timeline of general elections in a given year[edit]
The following query uses these:
- Items: public election (Q40231)
- Properties: instance of (P31) , subclass of (P279) , point in time (P585)
#defaultView:Timeline #title: List of general elections in 2024 SELECT ?item ?itemLabel ?date WHERE { SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint "en.wikipedia.org"; wikibase:api "Generator"; mwapi:generator "links"; mwapi:titles "List of elections in 2024";. ?item wikibase:apiOutputItem mwapi:item. } FILTER BOUND (?item) ?item wdt:P31/wdt:P279* wd:Q40231 ; wdt:P585 ?date ; rdfs:label ?itemLabel filter (lang(?itemLabel) = "en") . } ORDER BY ?date