Implement BETWEEN sql operator