Is there some way to use a kind of placeholder variable with SPARQL without returning it when using SELECT * ?
For example:
SELECT * WHERE {
?s dcterms:title ?title;
foaf:person ?name.
?s2 :inProject ?s.
}
Where I would not want to return the ?s variable, just the ?title, ?name, and ?s2 variables while leaving the SELECT *.
I understand I can limit the select results by using SELECT ?title ?name ..., but I'm just curious if there is some kind of notation for placeholder variables or some way to manage this.
EDIT:
I understand you can use blank nodes to accomplish this in some cases, for example:
SELECT * WHERE {
_:s dcterms:title ?title;
foaf:person ?name.
?s2 :inProject _:s.
}
However, doesn't this cause problems since blank nodes can't be used across basic graph patterns? For example, this breaks in the case:
SELECT * WHERE {
_:s dcterms:title ?title;
foaf:person ?name.
OPTIONAL { ?s2 :inProject _:s. }
}
Thanks!