SUM(CASE WHEN action IN ('settle', 'resettle', 'unsettle') THEN COALESCE(creditAmount - debitAmount, 0) WHEN action IN ('ConfirmBet', 'ConfirmBetParlay') THEN COALESCE(-actualAmount, 0) ELSE 0 END)