On Mon, 17 Apr 2000, G. Anthony Reina wrote:
> Let's say I have a table:
>
> table1
> =====
>
> subject_name text
> subject_age int4
> test_trial int4
> test_score int4
>
>
> I'd like to find out how many times a unique 'subject_name' is in the
> table. My SQL book says that I should be able to do this:
>
> select COUNT(DISTINCT subject_name) from table1;
SELECT DISTINCT(subject_name), COUNT(subject_name)
FROM table1
GROUP BY subject_name
;
Brett W. McCoy http://www.chapelperilous.net
---------------------------------------------------------------------------
Anything that is good and useful is made of chocolate.