select count(*),subject_Description
from proctor_details inner join subjects on subjects.subject_ID =prim_subject_ID
inner join proctors on proctors.proctorid = proctor_details.proctorid

where detailapproved2=1 and prim_subject_ID<>0
 and usercode  in( '111')
group by subject_Description
;










select count(*),subject_Description
from proctor_details inner join subjects on subjects.subject_ID =prim_subject_ID
inner join proctors on proctors.proctorid = proctor_details.proctorid

where detailapproved2=1 and prim_subject_ID<>0
 and usercode not in( '222','444','555','777','888','999','')
group by subject_Description
;