select pay_ability,concat(round(count(overdue_days)/count(*)*100,1),'%') overdue_ratio
from loan_tb a
left join customer_tb b
on a.customer_id=b.customer_id
group by pay_ability
order by overdue_ratio desc