select t1.fname,ftotalscore,fscore,count(t2.tagents_workersubmitid)fsubmitcount from tagents_workers t1
left join tagents_workersubmit t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid and
          t1.tenterprise_userid=t2.tenterprise_userid and t2.fsourceid is null
where t1.siteid=$siteid$ and t1.tenterprise_userid=$tenterprise_userid$
group by t1.fname,ftotalscore,fscore