PREFIX dbp-owl: <http://dbpedia.org/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dbpprop-ja: <http://ja.dbpedia.org/property/>
PREFIX dbp-category: <http://ja.dbpedia.org/resource/Category:>
PREFIX dbp-template: <http://ja.dbpedia.org/resource/Template:>
select distinct ?label ?team_label
where {
#対象は日本人の野球選手
{
?person dcterms:subject dbp-category:日本の野球選手 .
} union {
?person dcterms:subject dbp-category:MLBの日本人選手 .
} union {
?person dcterms:subject dbp-category:在日外国人の野球選手 .
} union {
?person dcterms:subject dbp-category:日系人の野球選手 .
}
?person rdfs:label ?label ;
dbp-owl:team ?team.
# リダイレクトページの可能性を疑う
{
?team dbp-owl:wikiPageRedirects ?redirects .
?redirects dbpprop-ja:wikiPageUsesTemplate dbp-template:日本の高等学校 ;
rdfs:label ?team_label .
} union {
?team dbpprop-ja:wikiPageUsesTemplate dbp-template:日本の高等学校 ;
rdfs:label ?team_label .
}
}
More than 5 years have passed since last update.
日本の野球選手の出身高校を列挙するクエリの例
Last updated at Posted at 2015-07-14
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
67