当前位置:网站首页>True MySQL interview question (21) - Finance - overdue loan
True MySQL interview question (21) - Finance - overdue loan
2022-06-23 05:48:00 【Socialphobia_ FOGO】
The loan is overdue
A financial loan company , You need to know about the overdue loans of users . There is a user in the company's database " Loan overdue days " surface .
When overdue days =0 when , Write it down as M0,
Overdue days in [1,30] In the interval , Write it down as M1,
Overdue days in [31,60] In the interval , Write it down as M2,
Overdue days in [61,90] In the interval , Write it down as M3,
Other higher overdue days are recorded as M4+,
Now we need to analyze each overdue period in the database (M0、M1、M2、M3、M4+) Number of orders , If it's you , How will it be analyzed ?
give the result as follows :
SELECT
SUM(CASE WHEN Days overdue =0 THEN 1 ELSE 0 END) AS M0,
SUM(CASE WHEN Days overdue BETWEEN 1 AND 30 THEN 1 ELSE 0 END) AS M1,
SUM(CASE WHEN Days overdue BETWEEN 31 AND 60 THEN 1 ELSE 0 END) AS M2,
SUM(CASE WHEN Days overdue BETWEEN 61 AND 90 THEN 1 ELSE 0 END) AS M3,
SUM(CASE WHEN Days overdue >90 THEN 1 ELSE 0 END) AS M4
FROM Loan overdue days
边栏推荐
- Wechat applet: wechat can also send flash photos to create wechat applet source code download and customize flash time
- Advanced Mathematics (Seventh Edition) Tongji University exercises 1-7 personal solutions
- PAT 乙等 1012 C语言
- June 22, 2022: golang multiple choice question, what does the following golang code output? A:3; B:1; C:4; D: Compilation failed. package main import ( “fmt“ ) func mai
- AHA C language Chapter 7 you can do more with it (talks 27-28)
- Wechat applet; AI intelligent dubbing assistant
- Mobile power fast charging qc3.0 scheme chip ip5318 fast charging scheme
- PAT 乙等 1013 C语言
- 低成本5W无线充电器方案FS68001B简便充电芯片
- MDM data cleaning function development description
猜你喜欢

The digital collection market has just begun

June 22, 2022: golang multiple choice question, what does the following golang code output? A:3; B:1; C:4; D: Compilation failed. package main import ( “fmt“ ) func mai

数字藏品市场才刚刚开始

runc 符号链接挂载与容器逃逸漏洞预警(CVE-2021-30465)

MDM数据清洗功能开发说明

Real MySQL interview question (30) -- shell real estate order analysis
![[image fusion] sparse regularization based on non convex penalty to realize image fusion with matlab code](/img/e2/24eb2a60e3dc603b3ec4bfefd0b8e5.png)
[image fusion] sparse regularization based on non convex penalty to realize image fusion with matlab code

Export PDF with watermark

2022年中国重卡智能化升级专题研究

Lottery DDD code
随机推荐
104. simple chat room 7: use socket to transfer objects
英集芯ip6806无线充电方案5W过Qi认证外围精简14颗器件
Low cost 5W wireless charger scheme fs68001b simple charging chip
MySQL面试真题(二十四)——行列互换
Skill self check | do you know these 6 skills if you want to be a test leader?
MySQL面试真题(二十二)——表连接后的条件筛选及分组筛选
雷达图canvas
Management system of borrowed books based on SSM framework
Alibaba cloud object storage oss+picgo+typera implements the construction map
MySQL面试真题(二十一)——金融-贷款逾期
Current situation and development of containerization technology under the cloud native trend
Wechat applet: production and generation of love guarantee
MySQL面试真题(二十八)——案例-通讯运营商指标分析
Build a gocd environment
PAT 乙等 1022 D进制的A+B
SIFT feature point extraction
PAT 乙等 1021 个位数统计
2022年中国重卡智能化升级专题研究
Advanced Mathematics (Seventh Edition) Tongji University exercises 1-7 personal solutions
MySQL面试真题(二十七)——RFM分析法对用户进行分类