query-0d0e28ddac51dba2d2c3be6a10bcaf79
Bundesliga
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?season ?seasonLabel (COUNT(?team) AS ?teams) (SAMPLE(?start) AS ?start) (SAMPLE(?end) AS ?end) WHERE {
?season wdt:P31 wd:Q82595 .
?season wdt:P1923 ?team .
OPTIONAL {?season wdt:P580 ?start}
OPTIONAL {?season wdt:P582 ?end}
SERVICE wikibase:label { bd:serviceParam wikibase:language "de" }
}
GROUP BY ?season ?seasonLabel
ORDER BY ?seasonLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?end"):::projected
v2("?season"):::projected
v1("?seasonLabel"):::projected
v7("?start"):::projected
v3("?team"):::projected
v6("?teams")
c9(["de"]):::literal
c7(["bd:serviceParam"]):::iri
c2(["wd:Q82595"]):::iri
v2 --"wdt:P31"--> c2
v2 --"wdt:P1923"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P580".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P582".-> v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind3[/"count(?team)"/]
v3 --o bind3
bind3 --as--o v6
bind4[/"sample(?start)"/]
v7 --o bind4
bind4 --as--o v7
bind5[/"sample(?end)"/]
v7 --o bind5
bind5 --as--o v7