题解 | 分析客户逾期情况
分析客户逾期情况
https://www.nowcoder.com/practice/22633632da344e2492973ecf555e10c9
select t1.pay_ability ,concat(truncate(sum(case when coalesce(overdue_days,0)>0 then 1 else 0 end)/count(*)*100,1),'%') as overdue_ratio from loan_tb t join customer_tb t1 on t.customer_id=t1.customer_id group by t1.pay_ability order by overdue_ratio desc
