查出某一时间段的数据
select * from table_info where sign_in_time BETWEEN '2021-04-22 13:19:39' and '2021-12-16 14:59:48' ORDER BY sign_in_time
查出前三天之前的数据
select * from table_info where DATEDIFF(now(),sign_in_time) > 3 ORDER BY sign_in_time desc;
查出某一时间段的数据
select * from table_info where sign_in_time BETWEEN '2021-04-22 13:19:39' and '2021-12-16 14:59:48' ORDER BY sign_in_time
查出前三天之前的数据
select * from table_info where DATEDIFF(now(),sign_in_time) > 3 ORDER BY sign_in_time desc;