Let say I have data like this.
ConDate ID TreN AriT
20180424 54294631 1 8030
20180424 54294631 2 8030
20180425 25005102 1 8040
20180425 25005102 2 8045
I want to find data which has same conDate,ID,AriT but different TreN.
In this case first and second row should be selected.
I am not sure how to write query for this kind of situation.
If they meet the requirement, then I want to add extra column next to 'AriT' saying Y for meet the requirement and N for Not meet the requirement.
can some one please help me? Thanks!