I need to get the annual revenue for Transfer prospects(defined by alliance_member_classification = 'TPR')
for this I need to join 2 tables such as: fh_history(business_id, history_trans_id, campaign_history_date, campaign_nbr, annual_revenue) allaince_history(business_id, contact_id, alian_id, campaign_nbr,fedex_acct_nbr, alliance_member_classification )
where prospect_id ( is defined as business_id + contact_id - one business can have multiple contact_ids and one alliance can have mulitple prospects. One campaign can have only many prospects.
Revenue should not be double counted.. for example: business_id contact_id fedex_acct_nbr annual_revenue 5 12 1 5000 5 13 1 5000 5 14 1 5000
one business has multiple contacts . so in above example the annual reveue shoule be 5000 and not 15000