refine sql
rebase
Merge pull request #47 from xduo/master

refine sql