select c.pay_ability, concat(round(count(l.overdue_days)/count(*)*100,1),'%') overdue_ratio from loan_tb l left join customer_tb c using(customer_id) group by c.pay_ability order by overdue_ratio desc

select c.pay_ability, concat(round(count(l.overdue_days)/count(*)*100,1),'%') overdue_ratio from loan_tb l left join customer_tb c using(customer_id) group by c.pay_ability order by overdue_ratio desc