Add functionality to allow paging on a distinct statement