I have 3 fields:
dx_cd
person_id
chr_allow_amt
What I need to do is group by dx_cd, then within each dx_cd, group by person_id where the sum of chr_allow_amt is >= $500.00 per person_id within the dx_cd group.
How is something like this done??
There are a great deal more dx_cd values then below. this is a very small sample.
dx_cd person_id chr_allow_amt
0059 uhieXv4hPoeo5Q .0000
0059 uhieXv4hPoeo5Q 375.0000
0059 uWAYXbyT1Gwo5Q 43.2000
0059 uWAYXbyT1Gwo5Q 50.3400
0059 uWAYXbyT1Gwo5Q 97.0600
0059 uWAYXbyT1Gwo5Q 99.8300
0059 uWAYXbyT1tsogh 9.8600
0059 uWAYXbyT1tsogh 97.0600
0059 uWAYXbyT1tsogh 99.8300
00845 igohlboJ1a2hPh .0000
00845 igohlboJ1a2hPh 1684.5500
00845 o5fEFWoqtXOogQ 1166.4200
00845 o5fEFWoqtXOogQ 3133.5800
00845 oQeYXfyolG2o1h .0000
00845 oQeYXfyolG2o1h 3453.6600
00845 Q5AUas0ugFsogQ .0000
For dx_cd 00845, person_id - o5fEFWoqtXOogQ the total would be $4300.00
Thanks for your help and time!!
dx_cd
person_id
chr_allow_amt
What I need to do is group by dx_cd, then within each dx_cd, group by person_id where the sum of chr_allow_amt is >= $500.00 per person_id within the dx_cd group.
How is something like this done??
There are a great deal more dx_cd values then below. this is a very small sample.
dx_cd person_id chr_allow_amt
0059 uhieXv4hPoeo5Q .0000
0059 uhieXv4hPoeo5Q 375.0000
0059 uWAYXbyT1Gwo5Q 43.2000
0059 uWAYXbyT1Gwo5Q 50.3400
0059 uWAYXbyT1Gwo5Q 97.0600
0059 uWAYXbyT1Gwo5Q 99.8300
0059 uWAYXbyT1tsogh 9.8600
0059 uWAYXbyT1tsogh 97.0600
0059 uWAYXbyT1tsogh 99.8300
00845 igohlboJ1a2hPh .0000
00845 igohlboJ1a2hPh 1684.5500
00845 o5fEFWoqtXOogQ 1166.4200
00845 o5fEFWoqtXOogQ 3133.5800
00845 oQeYXfyolG2o1h .0000
00845 oQeYXfyolG2o1h 3453.6600
00845 Q5AUas0ugFsogQ .0000
For dx_cd 00845, person_id - o5fEFWoqtXOogQ the total would be $4300.00
Thanks for your help and time!!