1. select COUNT(user_id) AS'api人数',sum(margin_balance )AS'保证金总金额'
    2. FROM(
    3. SELECT DISTINCT A.user_id,c.margin_balance/100000000 as 'margin_balance' from t_api_key A
    4. LEFT JOIN clear.t_account as c
    5. ON c.client_id=A.user_id
    6. where key_type=2
    7. )B