Here is sample table I have built
Policy Year Losses Losses Pd Premium
1234 99 1 $3,000 $2,000
1234 00 0 $0000 $3,000
1234 01 2 $5,000 $4,000
I am trying to build a query that will only total the paid losses and premium in the years that this policyholder had claims then in the end...