多表查询

select u.nameid,u.phone,u.username,sum(i.inmoney)-sum(o.outmoney) as balance from users u inner join tablein i on u.nameid=i.nameid join tableout o on u.nameid=o.nameid group by o.nameid,i.name_id ;
2017-10-09 21:58 | 261次阅读 | 0评
浏览152297次