问题
I am trying to create a SPARQL query which gets the charity organisations and their location from DBpedia.
Here is the link to one charity -- http://dbpedia.org/page/Stonewall_(charity).
I am trying to get all the charities that exist with the names and location.
I want to retrieve dbp:name
along with dbo:headquarter
.
回答1:
You could try this:
select distinct ?name (group_concat(?headquarter;separator=",")) where
{?s a dbo:Organisation.
?s dbo:status "Charity".
?s dbp:name ?name.
?s dbo:headquarter/rdfs:label ?headquarter }
LIMIT 100
来源:https://stackoverflow.com/questions/41774220/trying-to-get-the-name-of-charity-organisations-with-their-locations-sparql