query-eb3f701fafe35a42ac037093f050a7a5
Olympic Games editions
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?website ?country (GROUP_CONCAT(DISTINCT ?location; SEPARATOR=', ') AS ?locations) ?edition ?time ?start ?end ?participants ?delegations ?events ?disciplines WHERE {
VALUES ?gamesClass { wd:Q159821 wd:Q82414 }
?item wdt:P31 ?gamesClass .
OPTIONAL { ?item wdt:P856 ?website }
OPTIONAL { ?item wdt:P17 ?country }
OPTIONAL { ?item wdt:P276/rdfs:label ?location . FILTER(LANG(?location) = 'en') }
OPTIONAL { ?item p:P1132 [ ps:P1132 ?participants; pq:P642 wd:Q2066131 ] }
OPTIONAL { ?item p:P1132 [ ps:P1132 ?delegations; pq:P642 wd:Q26213387 ] }
OPTIONAL { ?item wdt:P393 ?edition }
OPTIONAL { ?item wdt:P585 ?time }
OPTIONAL { ?item wdt:P580 ?start }
OPTIONAL { ?item wdt:P582 ?end }
OPTIONAL { ?item p:P2670 [ ps:P2670 wd:Q26132862; pq:P1114 ?disciplines; prov:wasDerivedFrom [ pr:P123 wd:Q40970; pr:P854 ?link ] ] }
OPTIONAL { ?item p:P2670 [ ps:P2670 wd:Q18536594; pq:P1114 ?events; prov:wasDerivedFrom [ pr:P123 wd:Q40970; pr:P854 ?link ] ] }
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} GROUP BY ?item ?itemLabel ?website ?country ?edition ?time ?start ?end ?participants ?delegations ?events ?disciplines ORDER BY ASC(?itemLabel)###
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?country"):::projected
v8("?delegations"):::projected
v13("?disciplines"):::projected
v9("?edition"):::projected
v12("?end"):::projected
v15("?events"):::projected
v3("?gamesClass")
v4("?item"):::projected
v1("?itemLabel"):::projected
v14("?link")
v2("?location"):::projected
v16("?locations")
v7("?participants"):::projected
v11("?start"):::projected
v10("?time"):::projected
v5("?website"):::projected
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
a6((" "))
a7((" "))
c11(["wd:Q26213387"]):::iri
c9(["wd:Q2066131"]):::iri
c26(["bd:serviceParam"]):::iri
c17(["wd:Q26132862"]):::iri
c24(["wd:Q18536594"]):::iri
c1(["en"]):::literal
c20(["wd:Q40970"]):::iri
bind0[/VALUES ?gamesClass/]
bind0-->v3
bind00(["wd:Q159821"])
bind00 --> bind0
bind01(["wd:Q82414"])
bind01 --> bind0
v4 --"p:direct/P31"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P856".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P17".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P276".-> a1
a1 --"rdfs:label"--> v2
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
a2 -."p:statement/P1132".-> v7
a2 --"p:qualifier/P642"--> c9
v4 --"p:P1132"--> a2
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
a3 -."p:statement/P1132".-> v8
a3 --"p:qualifier/P642"--> c11
v4 --"p:P1132"--> a3
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P393".-> v9
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P585".-> v10
end
subgraph optional7["(optional)"]
style optional7 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P580".-> v11
end
subgraph optional8["(optional)"]
style optional8 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P582".-> v12
end
subgraph optional9["(optional)"]
style optional9 fill:#bbf,stroke-dasharray: 5 5;
a4 -."p:statement/P2670".-> c17
a4 --"p:qualifier/P1114"--> v13
a5 --"p:reference/P123"--> c20
a5 --"p:reference/P854"--> v14
a4 --"prov:wasDerivedFrom"--> a5
v4 --"p:P2670"--> a4
end
subgraph optional10["(optional)"]
style optional10 fill:#bbf,stroke-dasharray: 5 5;
a6 -."p:statement/P2670".-> c24
a6 --"p:qualifier/P1114"--> v15
a7 --"p:reference/P123"--> c20
a7 --"p:reference/P854"--> v14
a6 --"prov:wasDerivedFrom"--> a7
v4 --"p:P2670"--> a6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c26 --"wikibase:language"--> c1
end
bind2[/"?location"/]
v2 --o bind2
bind2 --as--o v16