query-ac6c5eef9470c8ff5280c29c34279dbc
Timeline of number of participants for a given sport in the Winter Olympics
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#>
#TEMPLATE={ "template": { "en": "Sport: ?sport" }, "variables": { "?sport": { "query": "SELECT DISTINCT ?id WHERE { ?olympic_games wdt:P31 wd:Q82414 . ?olympic_disapline wdt:P361 ?olympic_games . ?olympic_disapline wdt:P641 ?id . }" } } }
#defaultView:LineChart
#title: Timeline of number of participants for a given sport in the Winter Olympics
SELECT (STR(YEAR(?pit)) AS ?year) ?participants WHERE {
BIND(wd:Q201965 AS ?sport)
?olympic_games wdt:P31 wd:Q82414.
?olympic_disapline wdt:P361 ?olympic_games;
wdt:P641 ?sport;
wdt:P1132 ?participants;
wdt:P585 ?pit.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY (?year)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?olympic_disapline")
v3("?olympic_games")
v5("?participants"):::projected
v6("?pit"):::projected
v2("?sport")
v7("?year")
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q82414"]):::iri
bind0[/"'wd:Q201965'"/]
bind0 --as--o v2
v3 --"wdt:P31"--> c2
v4 --"wdt:P361"--> v3
v4 --"wdt:P641"--> v2
v4 --"wdt:P1132"--> v5
v4 --"wdt:P585"--> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind1[/"str(year-from-dateTime(?pit))"/]
v6 --o bind1
bind1 --as--o v7