Adds OFFSET and GROUP BY to the triples() method in order to allow
pagination and reduce the number of results