SELECT
a.repayDate
FROM
t_jt_contract_data AS t
LEFT JOIN (SELECT contractId, MAX(id) AS maxId FROM t_jt_contract_fund_ransom_apply GROUP BY contractId) AS c ON t.id = c.contractId
LEFT JOIN t_jt_contract_fund_ransom_apply a ON c.maxId = a.id
WHERE
t.insertFlag = 2
MySql语句_取重复记录中最新的一条
最新推荐文章于 2024-03-16 14:06:39 发布