select pay_ability,concat(round(sum(case when overdue_days is not null then 1 else 0 end)/count(l.customer_id)*100,1),'%') as overdue_ratiofrom loan_tb l join customer_tb con l.customer_id=c.customer_idgroup by pay_abilityorder by overdue_ratio desc