删除重复数据并保留id最小的一条记录
delete from test where id not in
(
select a.id from (select min(id) as id from test group by form_id ) as a
)
一百天记录
SELECT
*
FROM
table_name
where date_sub(curdate(), INTERVAL 100 DAY)>=date(FROM_UNIXTIME(add_time))