move range query function into the Select object so that selects and range queries are chainable