Keep duplicates, select distinct on using data instead

To prevent inserting/ deleting same exception on every update