Added SubQuery support to provider