Is there a way to use the placeholder variable with SPARQL without returning it when using SELECT * ?
For instance:
SELECT * WHERE { ?s dcterms:title ?title; foaf:person ?name. ?s2 :inProject ?s. }
If I do not want to return the variable ?s , just the variables ?title ?name and ?s2 , leaving SELECT * .
I understand that I can limit the selection results with SELECT ?title ?name ... , but I'm just wondering if there is some kind of notation for the placeholder variables or how to manage this somehow.
EDIT:
I understand that you can use empty nodes to accomplish this in some cases, for example:
SELECT * WHERE { _:s dcterms:title ?title; foaf:person ?name. ?s2 :inProject _:s. }
However, this does not cause problems, since empty nodes cannot be used in the baseline templates? For example, this is interrupted if:
SELECT * WHERE { _:s dcterms:title ?title; foaf:person ?name. OPTIONAL { ?s2 :inProject _:s. } }
Thanks!
source share