select t2.fagentshortname,t1.fstorename,
       t1.farea,
    case
        when t1.farea < 60 then '<60'
        when t1.farea < 80 then '60-80'
        when t1.farea < 100 then '80-100'
        when t1.farea < 150 then '100-150'
        when t1.farea < 200 then '150-200'
        when t1.farea < 300 then '200-300'
        else '>300' end fclass
from DSBCRM..tstore t1
inner join DSBCRM..tagents t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid
where t1.siteid=$siteid$ and t2.fsaleruserid in $tenterprise_userid$