http://www.perlmonks.org?node_id=997484


in reply to Re^3: SQL Database Table to Perl Script
in thread SQL Database Table to Perl Script

Maybe this SQL will help.

SELECT AccNum, max(date), Type, sum(Amount) FROM transaction GROUP BY + AccNum, Type union SELECT AccNum, max(date),'Balance', sum(if (type='Debit',-1*Amount,Amo +unt)) FROM transaction GROUP BY AccNum; SELECT * FROM transaction t where chequeno is not null or ddno is not +null;

And this has little to do with perl this is an datbase question