Count of unique values of a field in a table. [message #38863] |
Wed, 22 May 2002 13:46 |
Al Webre
Messages: 2 Registered: May 2002
|
Junior Member |
|
|
I know I've seen how to do this somewhere before - but can't think of the right combination to get it. I have FIELD1 in TABLE1.
I can do select unique FILED1 from TABLE1; and get 5 separate values.
I can also select count (*) from TABLE1; and get 53,276, the number of rows in the table.
I want to count the number of unique entries for FILED1 in TABLE1. I haven't been able to do it.
The output should look something like
Value1 300
Value2 277
Value3 23555
Value4 4866
Value5 333
Does anybody know how to construct the PL/SQL statement to do this?
|
|
|
|
|
|