S
Stephen Remde
can anyone see where im going wrong with this...
select stud_company, count(*) as c1,
count(enroll_course=1 and enroll_status='P') as c2,
count(enroll_course=2 and enroll_status='P') as c3,
count(enroll_status='F') as c4
from enrollments, students
where enroll_student=stud_num
group by stud_company
i want to view results by company:
Results by company
Company Enrolments Level 1 Passes Level 2 Passes Fails
Acme 10 7 2
1
Microsoft 5 2 3
0
Thanks
Stephen
select stud_company, count(*) as c1,
count(enroll_course=1 and enroll_status='P') as c2,
count(enroll_course=2 and enroll_status='P') as c3,
count(enroll_status='F') as c4
from enrollments, students
where enroll_student=stud_num
group by stud_company
i want to view results by company:
Results by company
Company Enrolments Level 1 Passes Level 2 Passes Fails
Acme 10 7 2
1
Microsoft 5 2 3
0
Thanks
Stephen