If pervasive doesn't like all that sub-query and what not you can always get to the same result with a couple of views that accomplish making the same sets of data.