fix bug SQL BETWEEN operator min/max reverse