Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

SQLplus

Name: How to count 0 2008-10-29 19:53

I'm trying to count the number of 'classes' each student is taking, but I'm supposed to report back 0 if there are none. Right now, it just doesn't respond with the student.
Anyone out there been through a database class who solved this?

Name: Anonymous 2008-10-30 10:38

>>5
Fixed your SQL in 5 seconds:

select student.student_id, student_name, count(student.student_id)
from student left join enrolls on
(student.student_id=enrolls.student_id)
group by student.student_id, student_name;


>>3
UNION failure.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List