Re: shapes-ISSUE-168 (instance count): How to constrain number of instances of a class in a graph [SHACL - Core]

On 06/22/2016 04:27 PM, Holger Knublauch wrote:
> I was balancing brevity with precision in my proposal. The meaning of
> sh:minInstanceCount would be a constraint to limit the minimum number of
> (SHACL) instances of a given (SHACL) class. I could write down the SPARQL
> query, but whether that helps depends on whether the reader is familiar with
> SPARQL:
> 
> SELECT $this
> WHERE {
>     ?instance rdf:type/rdfs:subClassOf* $this .
> } HAVING (COUNT(?instance) < $minInstanceCount)
> 

I don't think that this query is correct SPARQL as it uses a variable outside
of aggregation that is not being GROUP BYd.

peter

Received on Wednesday, 22 June 2016 23:50:49 UTC