ARQ includes support for nested SELECTs.
Experimental feature.
This involves is syntactic extension and is available if the query is parsed
with language Syntax.syntaxARQ
.
A SELECT query can be placed inside a graph pattern to produce a table that is used within the outer query. A nested SELECT statement is enclosed in {} and is the only element in that group.
Example: find toys with more than five orders:
PREFIX : <http://example/> SELECT ?x { ?x a :Toy . { SELECT ?x ( count(?order) as ?q ) { ?x :order ?order } GROUP BY ?x } FILTER ( ?q > 5 ) }