Constrain sum of elements in an array

I had a question about constraining a column of a 2d array.
rand int unsigned data[8][4];

How do I write a constraint using unique to make sure the columns in the array are unique.
For eg:
constraint uniq { unique { data[0:7][0] }; }

The about didnt work.