Is there a way to select variables and get a count of the total variables in one Sparql query ? I want to return ?s and get a count of all the ?s matches
I tried variations of the query below but I keep getting errors
SELECT (COUNT(*) as ?cnt) ?s { ?s a <http://foo.org/test> }
COUNT
means the query is an aggregate query so there are many?s
.SAMPLE
picks one - which one is not defined.If you want all the
?s
and theCOUNT
, you'd normally count in your application - to do in the query is a bit odd, you need to ask twice: