分组后最新的记录 爱上


LEFT JOIN (select patent_no,legal_flag from t_legal_status as b where not exists(select 1 from t_legal_status where patent_no= b.patent_no
and b.publication_date<publication_date )) h on `a`.`patent_no` = `h`.`patent_no`

原文地址:https://www.cnblogs.com/xgyweb/p/15701392.html