query-3ab415c5d24dae0dd6ac61548c959209
by the particular sport competition item in question in line 2) wd:Q6834Evaluate a particular sport competition (replace
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 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#>
SELECT ?season ?seasonLabel ?season_follows ?season_followed_by ?competition ?competitionLabel ?isSeason ?isCompetition WHERE {
BIND(wd:Q6834 AS ?competition) .
?season p:P3450 ?competitionStatement .
?competitionStatement ps:P3450 ?competition .
OPTIONAL { ?competitionStatement pq:P155 ?season_follows }
OPTIONAL { ?competitionStatement pq:P156 ?season_followed_by }
BIND(EXISTS { ?season wdt:P31/wdt:P279* wd:Q27020041 } AS ?isSeason) .
BIND(EXISTS { ?season wdt:P31/wdt:P279* ?competition } AS ?isCompetition) .
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} ORDER BY ASC(?seasonLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?competition"):::projected
v4("?competitionStatement")
v8("?isCompetition"):::projected
v7("?isSeason"):::projected
v3("?season"):::projected
v1("?seasonLabel"):::projected
v6("?season_followed_by"):::projected
v5("?season_follows"):::projected
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
bind0[/"'wd:Q6834'"/]
bind0 --as--o v2
v3 --"p:P3450"--> v4
v4 --"p:statement/P3450"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P155".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P156".-> v6
end
v3 --"p:direct/P31"--> null
null --"p:direct/P279"--> null
bind1[/" "/]
subgraph bind1e0["Exists Clause"]
e0v1 --"p:direct/P31"--> e0a1
e0a1 --"p:direct/P279"--> e0c3
e0v1("?season"):::projected
e0a1((" ")):::projected
e0c3(["wd:Q27020041"]):::iri
end
bind1--EXISTS--> bind1e0
v3 --o bind1
null --o bind1
null --o bind1
null --o bind1
null --o bind1
bind1 --as--o v7
v3 --"p:direct/P31"--> null
null --"p:direct/P279"--> v2
bind2[/" "/]
subgraph bind2e1["Exists Clause"]
e1v1 --"p:direct/P31"--> e1a1
e1a1 --"p:direct/P279"--> e1v2
e1v2("?competition"):::projected
e1v1("?season"):::projected
e1a1((" ")):::projected
end
bind2--EXISTS--> bind2e1
v3 --o bind2
null --o bind2
null --o bind2
null --o bind2
v2 --o bind2
bind2 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end