I have something like this:
ID Result
1 value1
2 value1
2 value2
3 value1
3 value1
4 value1
4 value2
4 value3
Notice that ID 3 has the same result appearing in two rows.
Thanks to bluefeet (teradata sql pivot multiple occurrences into additional columns), I was able to produce something like this:
ID Result1 Result2 Result3
1 value1
2 value1 value2
3 value1
4 value1 value2 value3
I'm getting what I want, but because ID 3 has multiple results, they are counted as 2 and then included in the second column, which is for those results that return 2 occurrences for one ID.
What I would like it do is simply return the first occurrence of the duplicate ID 3 result in the Result1 column, like this:
ID Result1 Result2 Result3
1 value1
2 value1 value2
3 value1
4 value1 value2 value3
How can I eliminate that duplicate result and prevent it from counting?