Hi Lowell,
base on you suggestion this is what I came up with from the data posted...
SELECT
A.acct,
SUM(A.qty_buy) buy,
SUM(A.qty_sell) sell,
(SUM(A.qty_buy) - SUM(A.qty_sell)) stock,
MAX(A.[date]) tran_date
FROM
(
SELECT ACCT, qty qty_buy, 0 qty_sell, [date]
FROM #tmpInvTbl...