Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

count pass fail students in pivot table

i try to make code like sql to count pass & fail students and the failed one unint, two unit,.. like the following picture but it doesn't work.

this is the sql code..

this code to count failed three unit students.qlik01.png

SELECT

distinct ACADEMIC.PEOPLE_Id, academic.degree, count(td.EVENT_ID) "fail"

FROM

ACADEMIC

left outer join transcriptdetail td on academic.people_id=td.people_id and academic.academic_term=td.academic_term and academic.academic_year=td.academic_year

left outer join gradevalues on td.final_grade=gradevalues.grade and td.academic_year=gradevalues.academic_year and td.academic_term=gradevalues.academic_term and td.credit_type=gradevalues.credit_type

WHERE

academic.people_ID not in (001211102, 001210796, 001210830, 001311424, 001311428, 001311435, 001311478, 001312617, 001313092)

AND ACADEMIC.ACADEMIC_YEAR =2015 and academic.status!='n'

and not(academic.academic_Session='' or academic.academic_Session='easa')

AND ACADEMIC.ACADEMIC_TERM = 'FEB'

and academic.curriculum not like 'eas%' and pass_fail='f' and enroll_separation='en' and primary_flag='y'

and add_drop_wait='a' -- and academic.degree like 'bus%'

AND ACADEMIC.PEOPLE_ID=001210007

group by academic.degree, ACADEMIC.PEOPLE_ID having COUNT(event_id)=3

4 Replies
Not applicable
Author

can you please share the qvw with sample data ?

Anonymous
Not applicable
Author

how can i send you the file as attachment ?

Regards.

Anonymous
Not applicable
Author

Hi Mohammed ,

You can send the attachements using the Use advanced editor .

regards,

Bunny !

Anonymous
Not applicable
Author

thank you bunny,

regards.