Postgres Find Duplicate Values In Array Python