1
ffw5b7 OP 不妥……
|
2
ffw5b7 OP SELECT oc3.CONTRACT_ID from OSR_CONTRACT oc3
INNER JOIN ( SELECT MAX(oc2.CREATEDTIME ) AS CREATEDTIME FROM OSR_CONTRACT oc2 INNER join OSR_CONTRACT oc ON oc.CONTRACT_ID=oc2.RENEWAL_FIRST_CON WHERE oc.renewal_first_con IS NULL AND oc.IS_RENEWAL = 'N' GROUP BY oc2.RENEWAL_FIRST_CON ) AS a ON oc3.CREATEDTIME = a.CREATEDTIME 用时间关键感觉不妥 |
3
ffw5b7 OP 没有办法可能只能用时间关联先实现了。
|
4
ffw5b7 OP 就是分组后取每一组内最新的数据。
|
5
xsonglive491 2023-02-08 16:15:40 +08:00
|