Made the sqlbuilder build a valid select query