query-21670cb3af5ef26a4efd67e0097727b8
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 (SAMPLE(?sportLabel_) as ?sportLabel) ?citizenshipLabel
WHERE
{
{ SELECT DISTINCT ?person ?sexgender ?sport (GROUP_CONCAT(?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 . }
{ ?person wdt:P27 ?citizenship . ?citizenship rdfs:label ?citizenshipLabel_ . filter(lang(?citizenshipLabel_)="en") }
} GROUP BY ?person ?sexgender ?sport } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" .
?person rdfs:label ?personLabel .
?sexgender rdfs:label ?sexgenderLabel .
?sport rdfs:label ?sportLabel_ . }
} GROUP BY ?person ?personLabel ?sexgenderLabel ?citizenshipLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?citizenship")
v8("?citizenshipLabel"):::projected
v6("?citizenshipLabel_")
v2("?person"):::projected
v9("?personLabel"):::projected
v4("?sexgender")
v10("?sexgenderLabel"):::projected
v5("?sport")
v12("?sportLabel")
v11("?sportLabel_"):::projected
v1("?statements")
v3("?value")
c10(["bd:serviceParam"]):::iri
c6(["en"]):::literal
f0[["?statements > '50^^xsd:integer'"]]
f0 --> v1
v2 --"wdt:P3171"--> v3
v2 --"wikibase:statements"--> v1
v2 --"wdt:P21"--> v4
v2 --"wdt:P2416"--> v5
f1[["?citizenshipLabel_ = 'en'"]]
f1 --> v6
v2 --"wdt:P27"--> v7
v7 --"rdfs:label"--> v6
bind3[/"?citizenshipLabel_"/]
v6 --o bind3
bind3 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c6
v2 --"rdfs:label"--> v9
v4 --"rdfs:label"--> v10
v5 --"rdfs:label"--> v11
end
bind5[/"sample(?sportLabel_)"/]
v11 --o bind5
bind5 --as--o v12