Typescript Select Distinct Postgresql Database Cluster