Originally posted by: Firus
would it not work to do...
select studentNum, count(distinct(referralNum))
from studentTable
group by studentNum;
I threw together a quick table to test this on and it worked...
that is if you need each 'distinct' referral number, but if you just need the number of referral numbers for each student, leave out the 'distinct'
Originally posted by: Jumpem
I have a table with two columns... referralNum and studentNum. I
Originally posted by: Entity
You have one table with two columns, or multiple tables?
If you only have one table, then Firus' suggestion should be what you need (minus the distinct):
select studentNum, count(referralNum)
from studentTable
group by studentNum;
Rob