I have a historical table with some data like this:
cta_id | category_id --------+------------- 151 | 16 151 | 313,73 151 | 16,23 151 | 502