Hi,
Here u just write smaple data not the exact query .
U can use Case statement in ur Query & I think below query some help u:-
Select memno,acct_num,routno,enrolldt,
sum(case when date(rpt_date) between "2008-03-01" and "2008-03-31" then totalpaid else 0 end) MAR,
sum(case when date(rpt_date) between "2008-04-01" and "2008-04-30" then totalpaid else 0 end) APR,
sum(case when date(rpt_date) between "2008-05-01" and "2008-05-31" then totalpaid else 0 end) MAY,
sum(case when date rpt_date) between "2008-06-01" and "2008-06-30" then totalpaid else 0 end) JUN
From Table_name
Regard's
Saurabh Goyal
http://webexpert.wordpress.com