query-91a35bfd25f0b577077e30801b2c4cde

rq turtle/ttl

Propertiesinstance of (P31)subclass of (P279)point in time (P585)

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
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#>
#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

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?date"):::projected v3("?item"):::projected v2("?itemLabel"):::projected a1((" ")) c13(["mwapi:item"]):::iri c16(["wd:Q40231"]):::iri c5(["en.wikipedia.org"]):::literal c3(["bd:serviceParam"]):::iri c11(["List of elections in 2024"]):::literal c9(["links"]):::literal c7(["Generator"]):::literal f0[["?itemLabel = 'en'"]] f0 --> v2 f1[["bound(?item)"]] f1 --> v3 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c3 --"mwapi:endpoint"--> c5 c3 --"mwapi:api"--> c7 c3 --"mwapi:generator"--> c9 c3 --"mwapi:titles"--> c11 v3 --"mwapi:apiOutputItem"--> c13 end v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c16 v3 --"wdt:P585"--> v1 v3 --"rdfs:label"--> v2