Implemented attic relation-relation query.