示例: 查询最近一周12:30分到13:00这段时间内的订单量: SELECT * FROM T_ORDER O WHERE O.CREATEDATETIME BETWEEN SYSDATE AND SYSDATE AND TO_CHAR(O.CREATEDATETIME, 'hh24:mi:ss') BETWEEN '12:30:00' AND '13:00:00' 查询某段日期内某个时间段的订单量: SELECT * FROM T_ORDER O WHERE O.CREATEDATETIME…
用 sql 获取一段时间内的数据: SELECT * FROM EDI.edi_history WHERE timestampdiff(day, SYSDATE(), create_time_loc) <= AND timestampdiff(day, SYSDATE(), create_time_loc) >= ; SELECT * FROM 表名 WHERE timestampdiff(MINUTE, SYSDATE(), send_time) <= AND timestampdif…