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

Right, should have been SELECT SAMPLE($this) or GROUP BY $this. I didn't 
try this as I first wanted to see if there is interest in this solution 
at all.

Thanks,
Holger


On 23/06/2016 9:50, Peter F. Patel-Schneider wrote:
>
> 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:53:30 UTC