Quick sample of table
Person
ID Term
1 1078
1 1082
2 1026
2 1088
3 1078
4 1122
4 1138
I want to count an ID if their first term ends in 8 and don't count them if their first term doesn't end in 8 so results:
Term Count ID
1078 2 (ID 1 and 3)
1088 0 (since ID 2 has their first term ending with 6 they are not included)
1138 0 (since ID 4 has their first term ending with 2 they are not included)
Help is appreciated. Thanks
Person
ID Term
1 1078
1 1082
2 1026
2 1088
3 1078
4 1122
4 1138
I want to count an ID if their first term ends in 8 and don't count them if their first term doesn't end in 8 so results:
Term Count ID
1078 2 (ID 1 and 3)
1088 0 (since ID 2 has their first term ending with 6 they are not included)
1138 0 (since ID 4 has their first term ending with 2 they are not included)
Help is appreciated. Thanks