I have mysql database structure and values:
name | x | y | z
------------------
name1 | 1 | 1 | 2
name2 | 2 | 1 | 3
name3 | 1 | 1 | 1
And now i need add extra column with counter unique values (x,y,z) for each row:
name | x | y | z | unique
--------------------------
name1 | 1 | 1 | 2 | 2
name2 | 2 | 1 | 3 | 3
name3 | 1 | 1 | 1 | 1
How can i do that?