select t.*
from tablename t
inner join (select t.xxx, max(DATE_TIME) date_time
from tablename1 t
group by t.xxx) n
on t.xxx = n.xxx
and t.date_time = n.date_time
where t.xxx in ('df', 'ff', 'dff')

posted on 2020-11-04 14:52  Apeak  阅读(324)  评论(0编辑  收藏  举报