From surenkid, 4 Months ago, written in MySQL.
Embed
  1. SELECT w.`level`,w.`time`,date_add(w.`time`, interval -1 hour) beforetime,date_add(w.`time`, interval 1 hour) aftertime
  2. -- LEFT JOIN wo ON wo.paytime date_add(w.`time`, interval -1 hour) AND date_add(w.`time`, interval 1 hour)
  3. FROM wfx_wheel_record w
  4. WHERE w.`level` <7 AND w.id>3100