Update SQL Pagination to use python-sql

* Implemented distinct
Merge branch 'sql-pagination' into develop