Hi All,
I am trying to transform the data below (please see both tables). I am able to get the first two columns in the transformed table by using group by and distinct count. I am unable to come up with a clean logic to get column 3. Can you help?
Data:
| ID1 | ID2 | ID3 |
| A | 1 | 1 |
| A | 1 | 1 |
| A | 2 | 0 |
| A | 2 | 0 |
| A | 3 | 1 |
| A | 3 | 1 |
| A | 3 | 1 |
| A | 4 | 0 |
Transformation: