query-0b39490c6cc103018b13b7f720145faa
title: Länder in Europa SELECT ?item ?land ?hauptstadt ?einwohner (GROUP_CONCAT(DISTINCT ?fläche; SEPARATOR = ", ") AS ?flächen) (GROUP_CONCAT(DISTINCT ?sprache; SEPARATOR = ", ") AS ?sprachen) (GROUP_CONCAT(DISTINCT ?code; SEPARATOR = ", ") AS ?codes) WHERE { ?item (wdt:P31/wdt:P279) wd:Q6256; (wdt:P361*) wd:Q46; wdt:P36 ?capital; wdt:P2046 ?fläche; wdt:P1082 ?einwohner. OPTIONAL { ?item wdt:P37 ?language. } OPTIONAL { ?language wdt:P424 ?code. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?item rdfs:label ?land. ?capital rdfs:label ?hauptstadt. ?language rdfs:label ?sprache. } } GROUP BY ?item ?land ?hauptstadt ?einwohner ORDER BY (?einwohner)
Use at
- https://query.wikidata.org/sparql
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#>
#title: Länder in Europa
SELECT ?item ?land ?hauptstadt ?einwohner (GROUP_CONCAT(DISTINCT ?fläche; SEPARATOR = ", ") AS ?flächen) (GROUP_CONCAT(DISTINCT ?sprache; SEPARATOR = ", ") AS ?sprachen) (GROUP_CONCAT(DISTINCT ?code; SEPARATOR = ", ") AS ?codes) WHERE {
?item (wdt:P31/wdt:P279) wd:Q6256;
(wdt:P361*) wd:Q46;
wdt:P36 ?capital;
wdt:P2046 ?fläche;
wdt:P1082 ?einwohner.
OPTIONAL { ?item wdt:P37 ?language. }
OPTIONAL { ?language wdt:P424 ?code. }
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?item rdfs:label ?land.
?capital rdfs:label ?hauptstadt.
?language rdfs:label ?sprache.
}
}
GROUP BY ?item ?land ?hauptstadt ?einwohner
ORDER BY (?einwohner)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?capital")
v6("?code"):::projected
v12("?codes")
v1("?einwohner"):::projected
v4("?fläche"):::projected
v10("?flächen")
v8("?hauptstadt"):::projected
v2("?item"):::projected
v7("?land"):::projected
v5("?language")
v9("?sprache"):::projected
v11("?sprachen")
a1((" "))
c5(["wd:Q46"]):::iri
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q6256"]):::iri
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v2 --"wdt:P361"--> c5
v2 --"wdt:P36"--> v3
v2 --"wdt:P2046"--> v4
v2 --"wdt:P1082"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P37".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P424".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
v2 --"rdfs:label"--> v7
v3 --"rdfs:label"--> v8
v5 --"rdfs:label"--> v9
end
bind3[/"?fläche"/]
v4 --o bind3
bind3 --as--o v10
bind4[/"?sprache"/]
v9 --o bind4
bind4 --as--o v11
bind5[/"?code"/]
v6 --o bind5
bind5 --as--o v12