Postgres Select Unique Value Sql Developer Interview