【发布时间】:2023-02-05 22:03:39
【问题描述】:
这是我要转换成 SQL 的数据
| Seetle_date(1st Column) | days_to_settle (2nd Column) | days_late (3rd Column) | Settle_Status (outcome = 1column) |
|---|---|---|---|
| 1/8/2021 | 11 | 0 | Settle on Time |
| 11/5/2021 | 16 | 0 | <15 Days Late |
| 10/11/2020 | 31 | 1 | <30 Days Late |
我不知道需要什么功能来做到这一点;
案例陈述,分组依据, 订购方式
我在 EXCEL 中得到了这个公式来理解我想要什么。
=IF(AND(B2-C2\<=15,B2-C2\>=0),"Settle on Time",IF(AND(B2-C2\<=30,B2-C2\>15),"\<15 Days Late","\<30 Days Late"))
我需要在 sql 中转换它。
【问题讨论】:
标签: mysql