Stardog 9.2 - I can't reuse variables in SELECT queries

Created by Steve Place, Modified on Wed, 20 Mar 2024 at 11:12 AM by Steve Place

Prior to Stardog 9.2, Stardog incorrectly allowed you to reuse variables in SELCET queries, like this:

SELECT (COUNT(?count) AS ?count)
WHERE {
    ?count ?p ?o .
}

This violates the SPARQL spec, so we changed the query engine to not allow this. Instead, you can write your queries like this:

SELECT (COUNT(?count0) AS ?count)
WHERE {
    ?count0 ?p ?o .
}

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article