I want to delete the same data and leave only the one with the largest datetime type in the ta field.

I want to delete the same data only the one with the largest datetime type in the ta field
where exists (select 1 from hahha t where t.ta=hahha.ta and t.ta > hahha.ta)
select * from hahha previously this condition can delete the value type, but now it is the time type

Sql
Mar.18,2021

DELETE FROM hahha  WHERE ta NOT IN
(
        SELECT  MAX(ta)

        FROM hahha

        GROUP BY tt,ts,tsb,tttt
)
Menu