Implement pagination and clump grouping | Peregrine SQL Question