也就是说最终结果每个id只有一行数据。那就用select * from table where id||日期=(select id||max(日期) from table group by id)分开写也可以。