Table from a database (without duplicate items)

Hi, I was checking to see if you found a solution for this? I wrote a similar code and am trying to diagnose my issue.