select * from 表名 where 目标字段(一般都是唯一id) = #{字段变量} and 时间字段 BETWEEN #{开始时间} and #{结束时间} ORDER BY 时间字段 DESC(降序) 默认则是升序
按时间段查询相关数据 order by desc 是按照降序排列 没有要求可不写,则默认升序