fixed sql query for getting category list for client2