Postgres Select Unique Value Sql Interview