按条件分组排序后取第一条

SELECT max.*
FROM (
SELECT DISTINCT a.*
FROM oa_return_bid_security_deposit a
ORDER BY a.update_date DESC
) max
GROUP BY deposit_code_id;

posted on 2021-12-30 18:26  今宵别梦涵  阅读(30)  评论(0编辑  收藏  举报

导航