Hi Team,
I have data like below.
| Id | Flag_A | Flag_B | Flag_C |
| 1000 | Y | N | Y |
| 1000 | N | Y | N |
| 1000 | Y | Y | N |
| 1000 | N | N | Y |
| 1000 | N | N | N |
| 2000 | N | N | Y |
| 2000 | N | N | N |
| 2000 | N | Y | Y |
| 3000 | Y | N | N |
| 3000 | N | N | N |
My result set should be like below:
| Id | Final_Flag_A | Final_Flag_B | Final_Flag_C |
| 1000 | Y | Y | Y |
| 2000 | N | N | Y |
| 3000 | Y | N | N |
Its basically the logic is for a given Id, if any of the values in 'Flag_A' has 'Y' then the Final_Flag_A should be 'Y' only. This implies to all the remaining 2 fields 'Flag_B' and 'Flag_C' as well.
Any help is much appreciated.
Thanks & Regards
Dilver