select count(distinct uid)
`户数`,sum(balance)
`余额`,round((sum(1day) / count(*)),2)
`逾期率` from ( select uid, balance, case when owerduedays > 1 then 1 else 0 `1day` from jieju where is_buding = 1 ) t1