测试select * from useraddmoney a left join (select username,sum(money) money from useraddmoney group by username) b on a.username=b.username where b.money>=a.tolpay
and not exists(select 1 from userinfo where username=a.username) and a.isok=1