query-58392b4692ba6e7a60a6ae1a34657070

rq turtle/ttl

election types SELECT ?item ?start ?country ?countryLabel ?place ?placeLabel ?LabelEN ?LabelDE ?Label WHERE { ?item wdt:P279 wd:Q40231 . OPTIONAL{?item wdt:P17 ?country .} OPTIONAL{?item wdt:P580 ?start .} OPTIONAL{?item wdt:P1001 ?place .} #OPTIONAL{?place rdfs:label ?placeLabel .} SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . ?item rdfs:label ?LabelEN . ?country rdfs:label ?countryLabel . ?place rdfs:label ?placeLabel } . SERVICE wikibase:label { bd:serviceParam wikibase:language "de" . ?item rdfs:label ?LabelDE } . SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,ar,be,bg,bn,ca,cs,da,de,el,en,es,et,fa,fi,he,hi,hu,hy,id,it,ja,jv,ko,nb,nl,eo,pa,pl,pt,ro,ru,sh,sk,sr,sv,sw,te,th,tr,uk,yue,vec,vi,zh" . ?item rdfs:label ?Label } } ORDER BY ?countryLabel ?placeLabel ?item

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#>
#election types
SELECT ?item ?start ?country ?countryLabel ?place ?placeLabel ?LabelEN ?LabelDE ?Label
WHERE
{
    ?item wdt:P279 wd:Q40231 .
    OPTIONAL{?item wdt:P17 ?country .}
    OPTIONAL{?item wdt:P580 ?start .}
    OPTIONAL{?item wdt:P1001 ?place .}
    #OPTIONAL{?place rdfs:label ?placeLabel .}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . ?item rdfs:label ?LabelEN . ?country rdfs:label ?countryLabel . ?place rdfs:label ?placeLabel } .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "de" . ?item rdfs:label ?LabelDE } .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,ar,be,bg,bn,ca,cs,da,de,el,en,es,et,fa,fi,he,hi,hu,hy,id,it,ja,jv,ko,nb,nl,eo,pa,pl,pt,ro,ru,sh,sk,sr,sv,sw,te,th,tr,uk,yue,vec,vi,zh" 
 . ?item rdfs:label ?Label }
}
ORDER BY ?countryLabel ?placeLabel ?item

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?Label"):::projected v8("?LabelDE"):::projected v7("?LabelEN"):::projected v4("?country"):::projected v1("?countryLabel"):::projected v3("?item"):::projected v6("?place"):::projected v2("?placeLabel"):::projected v5("?start"):::projected c11(["de"]):::literal c12(["fr,ar,be,bg,bn,ca,cs,da,de,el,en,es,et,fa,fi,he,hi,hu,hy,id,it,ja,jv,ko,nb,nl,eo,pa,pl,pt,ro,ru,sh,sk,sr,sv,sw,te,th,tr,uk,yue,vec,vi,zh"]):::literal c7(["bd:serviceParam"]):::iri c2(["wd:Q40231"]):::iri c9(["en"]):::literal v3 --"wdt:P279"--> c2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P17".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P580".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P1001".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 v3 --"rdfs:label"--> v7 v4 --"rdfs:label"--> v1 v6 --"rdfs:label"--> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c11 v3 --"rdfs:label"--> v8 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c12 v3 --"rdfs:label"--> v9 end