normalize joins key name earlier so checks are not needed later on
if joins are used, build a subquery to fix issue with limit and skip