Created
November 16, 2018 17:02
-
-
Save hideokamoto/ca3350bbb8e373e29ae68371ffba3e85 to your computer and use it in GitHub Desktop.
SPARQL覚書:プロ野球選手系のもろもろ ref: https://qiita.com/motchi0214/items/2656f2488ff164ce7a4e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX dbo: <http://dbpedia.org/ontology/> | |
SELECT DISTINCT ?name (group_concat(DISTINCT ?teamName; separator = ",") AS ?teams) (group_concat(DISTINCT ?positionName; separator = ",") AS ?positionNames) ?battingSide ?throwingSide ?comment | |
WHERE { | |
?link dbo:wikiPageWikiLink <http://ja.dbpedia.org/resource/全球団から本塁打>; | |
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/BaseballPlayer>; | |
rdfs:label ?name; | |
dbo:position ?position; | |
dbo:battingSide ?battingSide; | |
dbo:throwingSide ?throwingSide; | |
rdfs:comment ?comment; | |
dbo:team ?team. | |
?team rdfs:label ?teamName; | |
dbo:wikiPageWikiLink <http://ja.dbpedia.org/resource/日本プロ野球>. | |
?position rdfs:label ?positionName | |
} | |
order by rand() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX dbo: <http://dbpedia.org/ontology/> | |
SELECT DISTINCT ?name (group_concat(DISTINCT ?teamName; separator = ",") AS ?teams) (group_concat(DISTINCT ?positionName; separator = ",") AS ?positionNames) ?battingSide ?throwingSide ?comment | |
WHERE { | |
?link dbo:wikiPageWikiLink <http://ja.dbpedia.org/resource/最優秀選手_(日本プロ野球)>; | |
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/BaseballPlayer>; | |
rdfs:label ?name; | |
dbo:position ?position; | |
dbo:battingSide ?battingSide; | |
dbo:throwingSide ?throwingSide; | |
rdfs:comment ?comment; | |
dbo:team ?team. | |
?team rdfs:label ?teamName; | |
dbo:wikiPageWikiLink <http://ja.dbpedia.org/resource/日本プロ野球>. | |
?position rdfs:label ?positionName | |
} | |
order by rand() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX dbo: <http://dbpedia.org/ontology/> | |
SELECT DISTINCT ?name (group_concat(DISTINCT ?teamName; separator = ",") AS ?teams) (group_concat(DISTINCT ?positionName; separator = ",") AS ?positionNames) ?battingSide ?throwingSide ?comment | |
WHERE { | |
?link dbo:wikiPageWikiLink <http://ja.dbpedia.org/resource/野球界の永久欠番>; | |
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/BaseballPlayer>; | |
rdfs:label ?name; | |
dbo:position ?position; | |
dbo:battingSide ?battingSide; | |
dbo:throwingSide ?throwingSide; | |
rdfs:comment ?comment; | |
dbo:team <http://ja.dbpedia.org/resource/阪神タイガース>; | |
dbo:team ?team. | |
?team rdfs:label ?teamName; | |
dbo:wikiPageWikiLink <http://ja.dbpedia.org/resource/日本プロ野球>. | |
?position rdfs:label ?positionName | |
} | |
order by rand() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment