>CUST > >ACCT >11111 >22222 >77777 > >TRANS > >ACCT AMOUNT TYPE >11111 10.00 withdrawal >11111 11.00 withdrawal >11111 12.00 deposit >22222 20.00 withdrawal >22222 21.00 deposit >22222 22.00 deposit >22222 23.00 deposit >>
> >ACCT WITHDRAWALS DEPOSITS >11111 10.00 12.00 >11111 11.00 0 >22222 20.00 21.00 >22222 0 22.00 >22222 0 23.00 >>
select acct, sum(iif(type = "withdrawal", amount, $0)) as withdrawal,; sum(iif(type = "deposit", amount, $0)) as deposit; from MyTable; group by acctHTH, Hilmar.