سلام. از اس کیو ال کمک بگیری بهتر نیست؟ https://www.w3schools.com/sql/sql_distinct.asp