customize sql 010  add distinct to select.
Merge origin/master