Hi Stardog Team,
Does this kind of rule where “min”, “max”, “count” operation
inside IF statement work?
I have three persons, each of which is 20, 21, and 25 years old.
SL reasoner gives that all of those persons are the youngest.
Any advice would be appreciated…
insert {
:RULE a stardog:rule:SPARQLRule ;
stardog:rule:content """
IF {
?x <http://abc/AGE> ?minage .
{
select (min(?y) as ?minage)
where
{
?s a <http://abc/PERSON> .
?s <http://abc/AGE> ?y.
}
}
}
THEN {
?x <http://abc/YOUNGEST> "True" .
}""" .
}
where {
}
select ?x
where {
?x <http://abc/YOUNGEST> "True" .
}