SELECT * from carrying_progress a where a.billId='15248014166' and a.time=(SELECT MAX(time) from carrying_progress where a.billId =carrying_progress.billId); where后面的子查询要和前面的关联才行;
需要用时间戳类型显示日期时间列
很大的可能性是条件互斥了
SELECT * from carrying_progress where billId='15248014166' and time=(SELECT MAX(time) from carrying_progress); billId='15248014166' 这个条件去掉
max time的那条记录billId!='15248014166' 你select billId from carrying_progress order by time desc limit 1看下是什么
56,677
社区成员
56,708
社区内容
加载中
试试用AI创作助手写篇文章吧