* It shows what NOT is (basically allows you to say things like "give me all the states that are not Alabama").
* Uses the new HAVING clause.
* Seems to be a nice use case for count and/or subqueries i.e. the ability to execute an outer query and plug the results into the inner query finally makes sense.
select $s $p $x count (
where $s $p $type
and not($type <rdf:type> $x ))
where $r <rdf:type> <owl:Restriction>
and $r <owl:onProperty> $p
and $r <owl:allValuesFrom> $x
and $s $p $o2
having $k0 <tucana:occursMoreThan> '0'^^<xmlschema:nonNegativeInteger>
order by $s ;
$k0 is the variable binding for the COUNT - we should offer a way to explicitly bind aggregates to a variable.
Another new feature that Paul's been working on, querying only URIs, makes use of virtual graphs and magical predicates like our data typing support.