select t1.fsaleevent,count(t1.fsaleevent)fcount,SUM(t1.forderamount)forderamount from DSBCRM..tcustomer_reception t1
inner join DSBCRM..tagents t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid
where t1.ftype='ÏúÊÛ' and t1.siteid=$siteid$ and
convert(varchar(7),t1.fdate,120)>=$fbegmonth$ and convert(varchar(7),t1.fdate,120)<=$fendmonth$
and t1.fsaleevent is not null
group by t1.fsaleevent