I am trying to get some city data using the Sparql query on DBpedia. The problem is that I cannot get the request to work.
I am currently doing something like this:
SELECT ?title,?name,?abs WHERE {
?title skos:subject
<http://dbpedia.org/resource/Category:Cities%2C_towns_and_villages_in_Slovenia>.
?title dbpprop:officialName ?name.
?title dbpprop:abstract ?abs
}
I get all the cities, villages from Slovenia with all the data. The problem is that I would like to receive data (officialName and / or abstract) for only one city, for example Ljubljana. So I tried things like this:
SELECT ?name WHERE {
?name dbpprop:officialName
<http://dbpedia.org/resource/Ljubljana>.
}
Of course, this will not work. I don’t know exactly why, though :), but I experimented a bit and noticed some things, as if I put
?name skos:subject <http:
I get some results (which are not relevant to me, but in any case), but if I put
?name skos:subject <http:
-, skos: subject http://dbpedia.org/resource/Ljubljana.
- , , ?
,
Ablak