(aql-query
   ( select "s1" ( property any "root" subject ) )
   ( select "p1" ( property any "root" predicate ) )

   ( select "s2" ( property any "outerj" subject ) )
   ( select "p2" ( property any "outerj" predicate ) )
   ( select "o2" ( property any "outerj" object ) )

   ( select "s3" ( property any "innerj" subject ) )
   ( select "p3" ( property any "innerj" predicate ) )
   ( select "o3" ( property any "innerj" object ) )
	
   (join left ("outerj") (comp-eq (property IRI "root" object) (property IRI "outerj" subject))
         (join left ("innerj") (comp-eq (property IRI "outerj" object) (property IRI "innerj" subject))))

   (criterion (comp-eq (property IRI "root" predicate) (literal IRI "http://test1.aql-testdata/p/author-of")))
)
