select fcommunity, count(fcommunity) fcount
from tcustomer_reception t1
where ftype = 'دْتغ'
  and siteid =$siteid$
  and tagentsid=$tagentsid$
  and
    convert (varchar (7)
    , fdate
    , 120)>=$fbegmonth$
  and convert (varchar (7)
    , fdate
    , 120)<=$fendmonth$
and $where$
group by fcommunity