query-75521baf22e3a22380adb8ac49b5d410
Liste der Bundestagswahlkreise 2017 SELECT ?item ?itemLabel ?start ?ende ?katalogid ?katalog ?katalogLabel ?article #?osm_rel WHERE { BIND(wd:Q26971257 AS ?katalog) ?item wdt:P31 wd:Q11703715 . ?item p:P31 ?statement . OPTIONAL {?statement pq:P580 ?start.}. OPTIONAL {?statement pq:P582 ?ende.}. #OPTIONAL {?item wdt:P402 ?osm_rel.}. ?item p:P528 ?katalogStatement. ?katalogStatement ps:P528 ?katalogid. ?katalogStatement pq:P972 ?katalog. OPTIONAL { ?article schema:about ?item . ?article schema:inLanguage "de" . ?article schema:isPartOf https://de.wikipedia.org/ . } SERVICE wikibase:label { bd:serviceParam wikibase:language "de" } } ORDER BY xsd:integer(?katalogid)
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Liste der Bundestagswahlkreise 2017
SELECT ?item ?itemLabel ?start ?ende ?katalogid ?katalog ?katalogLabel ?article #?osm_rel
WHERE
{
BIND(wd:Q26971257 AS ?katalog)
?item wdt:P31 wd:Q11703715 .
?item p:P31 ?statement .
OPTIONAL {?statement pq:P580 ?start.}.
OPTIONAL {?statement pq:P582 ?ende.}.
#OPTIONAL {?item wdt:P402 ?osm_rel.}.
?item p:P528 ?katalogStatement.
?katalogStatement ps:P528 ?katalogid.
?katalogStatement pq:P972 ?katalog.
OPTIONAL {
?article schema:about ?item .
?article schema:inLanguage "de" .
?article schema:isPartOf <https://de.wikipedia.org/> .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "de" }
}
ORDER BY xsd:integer(?katalogid)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?article"):::projected
v6("?ende"):::projected
v3("?item"):::projected
v2("?katalog"):::projected
v7("?katalogStatement")
v1("?katalogid"):::projected
v5("?start"):::projected
v4("?statement")
c13([https://de.wikipedia.org/]):::iri
c11(["de"]):::literal
c2(["wd:Q11703715"]):::iri
c15(["bd:serviceParam"]):::iri
bind0[/"'wd:Q26971257'"/]
bind0 --as--o v2
v3 --"p:direct/P31"--> c2
v3 --"p:P31"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P580".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P582".-> v6
end
v3 --"p:P528"--> v7
v7 --"p:statement/P528"--> v1
v7 --"p:qualifier/P972"--> v2
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v8 -."schema:about".-> v3
v8 --"schema:inLanguage"--> c11
v8 --"schema:isPartOf"--> c13
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c11
end