Count of counts
From: Leif Neland <leif_at_roskildebc.dk>
Date: 1996/10/03
Message-ID: <32543F3A.5621_at_roskildebc.dk>#1/1
Date: 1996/10/03
Message-ID: <32543F3A.5621_at_roskildebc.dk>#1/1
I need to make a count of counts. I want to know how many students are
taking how many classes.
I then get a list like
But how do I get to the result:
I can get by by creating a table from the first query, do a query on
that
I start by doing:
SELECT student_id,count(class_id)
WHERE...
GROUP BY student_id;
STUDENT_ID COUNT(CLASS_ID)
---------- ---------------
1254 3
1358 3
1359 2
2401 1
CLASSES COUNT(...)
------- ----------
1 1
2 1
3 2
table, and finally dropping that table, but would like to avoid this
method
Leif Neland
Systems administrator
Roskilde Business College
Denmark
Received on Thu Oct 03 1996 - 00:00:00 CEST