raw query on num of and add training