I want a sql to count the number of student in each class as follows. Class No.of Student 1A 29 I don't know how to obtain the number of student, Anyone can help me?
Have been using the following: select L.classcode 'Class', count(*) 'No of Student' FROM TB_STU_STUDENT S, VW_STU_LATESTSTUSCHREC L where L.STUID = S.STUID and L.SCHYEAR = '2017' and (L.status=null or L.status not in (4,5,6)) group by L.CLASSLVL, L.classcode order by L.CLASSLVL
Thanks, But I want to know the meaning of L.status not in (4,5,6) what is inside the status field? What the number represent? thanks
Under Code Management > Report 4-Graduated, 5-Departed 6-Completed S3 select classcode 'Class', count(*) 'No of Students' FROM VW_STU_LATESTSTUSCHREC where SCHYEAR = '2017' and (status=null or status not in (4,5,6)) group by CLASSLVL, classcode order by CLASSLVL