I made a mistake and I have unwanted duplicates.
I have a table with 4 key fields. A1, k1, k2, k3.
A1
k1
k2
k3
You need a separator in your concat function, because otherwise "a", "b", and "cd" is the same as "abcd", "", "".