SELECT id, nick_name, account_name, `call`, join_domain
,(SELECT SUM(c.money) FROM member_money_charge_history c WHERE c.member_idx=member.idx AND c.status=3) AS ch_sum_money
,(SELECT SUM(d.money) FROM member_money_exchange_history d WHERE d.member_idx=member.idx AND d.status=3) AS ex_sum_money
/*,IFNULL((SELECT SUM(c.money) FROM member_money_charge_history c WHERE c.member_idx=member.idx AND c.status=3), 0)
            - 
 (IFNULL((SELECT SUM(d.money) FROM member_money_exchange_history d WHERE d.member_idx=member.idx AND d.status=3),0))
  AS gs*/
, (SELECT b.id FROM member b WHERE b.idx=member.recommend_member) AS re_id
,reg_time
from mydb.member
where u_business = 1 and status = 1 and level  <> 9 /*and id = 'guswn70'*/;