refactor sql code.1