select t1.tcustomer_receptid,
       t1.ftype,
       t1.fname,
       t1.fphonenumber,
       t1.fcommunity,
       t1.fnumber,
       t1.fwaiter,
       t1.createdate
from tcustomer_reception t1
where t1.siteid = $siteid$
  and t1.tagentsid = $tagentsid$
  and convert (varchar (10)
    , DATEADD(DD
    , -6
    , GETDATE())
    , 120)<=t1.createdate
  and $where$
order by t1.createdate desc