• I think you need to modify the Group By clause in the first select to

    group by ath_stlmnt_instr_id, ath_instr_id, ae.stlmnt_line_instr_id, ath_gl_num, ath_cost_cntr

    but you should also review the way you're handling the ath_usdamt calculation.