Fixed DISTINCT and ORDER_BY combination for postgresql
Merge pull request #223 from tarunbhardwaj/pagination

Fixed DISTINCT and ORDER_BY combination for postgresql