select * from bas_dredge,(SELECT C_ENTERPRISEID,MAX(D_UTIME) D_LTIME FROM BAS_DREDGE GROUP BY C_ENTERPRISEID) as temp_dredge
where bas_dredge.C_ENTERPRISEID=temp_dredge.C_ENTERPRISEID and bas_dredge.d_utime=temp_dredge.d_ltime;
2022-11-21 11:29:23
select * from bas_dredge,(SELECT C_ENTERPRISEID,MAX(D_UTIME) D_LTIME FROM BAS_DREDGE GROUP BY C_ENTERPRISEID) as temp_dredge
where bas_dredge.C_ENTERPRISEID=temp_dredge.C_ENTERPRISEID and bas_dredge.d_utime=temp_dredge.d_ltime;