mysql 去重 +排序 取最新的数据

SELECT  t.*  FROM 

  (SELECT log_search_content, MAX(log_create_date) log_create_date FROM t_full_text_search_log GROUP BY log_search_content) tmp
    LEFT JOIN  t_full_text_search_log t ON t.log_search_content = tmp.log_search_content
    AND t.log_create_date = tmp.log_create_date

posted @ 2022-05-10 10:55  AutumnSilence  阅读(582)  评论(0编辑  收藏  举报