clean up SQL