select TO_CHAR(riqi, 'YYYY-MM'), address, busness, myclass,
(select sum(money) from my_test where address=b.address and busness=b.busness and myclass=b.myclass and istrue = '是') shi_money,
(select sum(money) from my_test where address=b.address and busness=b.busness and myclass=b.myclass and istrue = '否') fou_money
from my_test b group by address, busness, myclass, TO_CHAR(riqi, 'YYYY-MM')