select case when t1.flastreadtime is null then '未浏览'else '已浏览' end as ftype,count(0)fcount from tnotice_users t1
inner join tenterprise_users t2 on t1.siteid=t2.siteid and t1.tenterprise_userid=t2.tenterprise_userid and t2.fusertype='经销商'
inner join tagents t3 on t2.siteid=t3.siteid and t2.tagentsid=t3.tagentsid
where t1.siteid=$siteid$ and t1.tnoticeid=$tnoticeid$ and t3.fsaleruserid in $tenterprise_userid$
group by case when t1.flastreadtime IS null then '未浏览'else '已浏览' end