Hi All...
I have a simple table with 2 fields in it...
mem_id and ref_id
For each mem_id in the table, there is an undetermined number of ref_id records...
How do I get a listing of the unique mem_ids along with a number that represents the number of records with that mem_id and different ref_ids?
Seems it should be pretty simple, but my eyes are crossing looking at it.
this is the latest test query, still with no luck
SELECT a.mem_id, count(b.ref_id)
FROM ref_track as a, ref_track as b
WHERE b.mem_id=a.mem_id
GROUP BY a.mem_id
ORDER BY a.mem_id
I always get a list of the 39,000+ records with 1 for a count for each of them...
Any help would be greatly appreciated.
thanks
Douglas