query-39114afe1e8046c6be7342c542cc5739
PropertiesOlympic.org athlete ID (archived) (P3171)sex or gender (P21)sports discipline competed in (P2416)country of citizenship (P27) TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT
?person ?personLabel ?sexgenderLabel ?sportLabel ?citizenshipLabel
WHERE
{
{ SELECT DISTINCT ?person ?sexgender (GROUP_CONCAT(DISTINCT ?sportLabel_;separator="; ") as ?sportLabel) (GROUP_CONCAT(DISTINCT ?citizenshipLabel_;separator="; ") as ?citizenshipLabel)
WHERE {
{ SELECT DISTINCT ?person
WHERE { ?person wdt:P3171 ?value .
?person wikibase:statements ?statements .
FILTER (?statements > 50) . }
}
{ ?person wdt:P21 ?sexgender . }
{ ?person wdt:P2416 ?sport . ?sport rdfs:label ?sportLabel_ . filter(lang(?sportLabel_)="en") }
{ ?person wdt:P27 ?citizenship . ?citizenship rdfs:label ?citizenshipLabel_ . filter(lang(?citizenshipLabel_)="en") }
} GROUP BY ?person ?sexgender } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
Query found at
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/06
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Biography/Query
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?citizenship")
v10("?citizenshipLabel"):::projected
v7("?citizenshipLabel_")
v2("?person"):::projected
v4("?sexgender")
v6("?sport")
v9("?sportLabel"):::projected
v5("?sportLabel_")
v1("?statements")
v3("?value")
c10(["bd:serviceParam"]):::iri
c5(["en"]):::literal
f0[["?statements > '50^^xsd:integer'"]]
f0 --> v1
v2 --"wdt:P3171"--> v3
v2 --"wikibase:statements"--> v1
v2 --"wdt:P21"--> v4
f1[["?sportLabel_ = 'en'"]]
f1 --> v5
v2 --"wdt:P2416"--> v6
v6 --"rdfs:label"--> v5
f2[["?citizenshipLabel_ = 'en'"]]
f2 --> v7
v2 --"wdt:P27"--> v8
v8 --"rdfs:label"--> v7
bind5[/"?sportLabel_"/]
v5 --o bind5
bind5 --as--o v9
bind6[/"?citizenshipLabel_"/]
v7 --o bind6
bind6 --as--o v10
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c5
end