[fix] [minor] sql query related changes in purchase common