/* 日本用户概况 */SELECT U.user_id, U.email, U.telephone, FROM_UNIXTIME(U.register_time/1000+28800,('%Y-%m-%d %H:%i:%S')) AS register_time, T.total_deposit AS 'deposit',T.times_deposit AS 'times_d',T.total_withdraw AS 'withdraw', T.times_withdraw AS 'times_w', A.margin_balance/100000000 AS margin_balance, (A.margin_balance/100000000 - T.total_deposit + T.total_withdraw) AS PNL, TRADE.volume, AF.inviter, AF.`reference_code`FROM management.t_trade_user ULEFT JOIN ( SELECT USER_ID, transaction_type, count(if(transaction_type='1',true,null)) as 'times_deposit', count(if(transaction_type='2',true,null)) as 'times_withdraw', SUM(IF(transaction_type='1',amount/100000000,0)) AS 'total_deposit', SUM(IF(transaction_type='2',amount/100000000,0)) AS 'total_withdraw' FROM management.t_wallet_transaction_history WHERE transaction_type IN ('1','2') GROUP BY USER_ID) AS T ON U.USER_ID = T.USER_ID LEFT JOIN `t_account` as AON U.user_id = A.client_idLEFT JOIN (SELECT client_id, SUM(taker_fee/1e8 - ABS(maker_fee/1e8)) AS netFee, SUM(trade_volume)AS 'volume' FROM affiliate.t_daily_trade GROUP BY client_id)AS TRADE on U.user_id = TRADE.client_idLEFT JOIN affiliate.t_invitation AS AF ON U.USER_ID = AF.inviteeWHERE U.user_id in (9834944607,6180832136,1461494430,2702453290,4424682227,1227311310,8887717604,6486205273,6104428332,1867912042,2582376337)ORDER BY register_time DESC