select distinct pay_ability,concat(round(sum(if(overdue_days is null,0,1))*100/count(*),1),'%') overdue_ratio from customer_tb ct,loan_tb lt where ct.customer_id=lt.customer_id group by pay_ability order by overdue_ratio desc