revise the sql

revise the sql clause