query-0113d7105e018347d783fbcb8b04fd2a
Humans whose occupation is Go professional or Go player SELECT ?goplayer ?goplayerLabel ?nativename ?occupationLabel ?genderLabel ?nationalityLabel ?birthdate ?goratings ?teacherLabel WHERE { # define occupation as Go professional (Q3186699) or Go player (Q12039558) values ?occupation {wd:Q3186699 wd:Q12039558} # find humans whose occupation (P106) is as defined above ?goplayer wdt:P106 ?occupation optional {?goplayer wdt:P1559 ?nativename} # P1559: name in native language optional {?goplayer wdt:P27 ?nationality} # P27: country of citizenship optional {?goplayer wdt:P2805 ?goratings} # P2805: Goratings ID optional {?goplayer wdt:P21 ?gender} # P21: sex or gender optional {?goplayer wdt:P569 ?birthdate} # P569: date of birth optional {?goplayer wdt:P1066 ?teacher} # P1066: student of # show label in simplified Chinese (zh-hans) as default, and English when no default label exists SERVICE wikibase:label {bd:serviceParam wikibase:language "zh-hans,en".} }
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#>
# Humans whose occupation is Go professional or Go player
SELECT ?goplayer ?goplayerLabel ?nativename ?occupationLabel ?genderLabel ?nationalityLabel ?birthdate ?goratings ?teacherLabel
WHERE {
# define occupation as Go professional (Q3186699) or Go player (Q12039558)
values ?occupation {wd:Q3186699 wd:Q12039558}
# find humans whose occupation (P106) is as defined above
?goplayer wdt:P106 ?occupation
optional {?goplayer wdt:P1559 ?nativename} # P1559: name in native language
optional {?goplayer wdt:P27 ?nationality} # P27: country of citizenship
optional {?goplayer wdt:P2805 ?goratings} # P2805: Goratings ID
optional {?goplayer wdt:P21 ?gender} # P21: sex or gender
optional {?goplayer wdt:P569 ?birthdate} # P569: date of birth
optional {?goplayer wdt:P1066 ?teacher} # P1066: student of
# show label in simplified Chinese (zh-hans) as default, and English when no default label exists
SERVICE wikibase:label {bd:serviceParam wikibase:language "zh-hans,en".}
}