Getting a list of American physicists from DBpedia using SPARQL

十年热恋 提交于 2019-12-05 08:05:11

The SPARQL you need would look like this ....

PREFIX category: <http://dbpedia.org/resource/Category:>
PREFIX dcterms: <http://purl.org/dc/terms/>

SELECT *
WHERE {
  ?s dcterms:subject category:American_physicists .
}

see results here

If you want the list with some extra predicates you need to join more triple patterns using the variable ?s. For instance, to retrieve the birthdate for each physicist ...

PREFIX category: <http://dbpedia.org/resource/Category:>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dbpedia: <http://dbpedia.org/ontology/>

SELECT *
WHERE {
  ?s dcterms:subject category:American_physicists .
  ?s dbpedia:birthDate ?bithdate .
}

results here

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!