排序后查重

SELECT DISTINCT ON(MID) * from draft where status='pass_' and mid in ('2197107','2235859','2122564') and is_delete is FALSE and is_online is TRUE ORDER BY mid,created_at DESC

原文地址:https://www.cnblogs.com/python001-vip/p/13324996.html