select distinct t3.fsaleruserid,
       t3.fprovince,
       t3.fcity,
       t3.fcounty,
       t3.fagentname,
       t4.fname,
       isnull(t4.fphonenumber,' ')as fphonenumber,
       t2.tenterprise_userid
from DSBCRM..tsubmiteditmodel t1
       inner join DSBCRM..tsubmitedit t2 on t1.siteid = t2.siteid and t1.tsubmiteditmodelid = t2.tsubmiteditmodelid and t2.fstatus='Μα½»'
       inner join DSBCRM..tagents t3 on t2.siteid = t3.siteid and t2.tagentsid = t3.tagentsid
       inner join DSBCRM..tenterprise_users t4 on t2.siteid = t4.siteid and t2.tenterprise_userid = t4.tenterprise_userid
where t1.siteid =$siteid$ and t1.tsubmiteditmodelid=$tsubmiteditmodelid$ and t3.fsaleruserid in $fsaleruserid$