"select count(*) from MSG where Jan1= :KEIZIBAN and sex= :op_sex and EntPC= :EntPC and Pref= :BFLAG and (flag=1 or (flag=2 and ID > 0))"