Getting a list of American physicists from DBpedia using SPARQL

I want to query American Physicsts and get a list of physicists. How can i do this?

+6
source share
1 answer

The SPARQL you need will 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 need a list with some additional predicates, you need to join the more triple patterns using the ?s variable. For example, to get the birth date of every 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

+10
source

Source: https://habr.com/ru/post/897329/


All Articles