Reputation: 101
I want to write a sparql query to get rdf data based on their id. I am trying with
SELECT ?ID ?NAME WHERE {?ID = "something" }
but does not return the expecting results. Does anyone knows which is my mistake?
Upvotes: 3
Views: 1301
Reputation: 1359
In order to have a precise answer you should share a small fragment of your RDF data (possibly in Turtle format, human friendly).
Upvotes: 2
Reputation: 696
Actually rdf:id is the resource URI itself. You can utilise a SPARQL FILTER clause for filtering your result, or you can directly insert the URI in the WHERE clause of your query, e.g.
<myURI> ex:name ?name .
Upvotes: 3