select value, count(value) as frequency from myTable group by value
order by 2 ASC
--
Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/
On Aug 1, 2005, at 11:36 AM, Roland Dumas wrote:
If I have the contents of a field in my database as an integer that
could take the values from 1-5
How do I query the database to tell me the frequency of each
integer, such as:
value - frequency
1 - 5
2 - 0
3 - 24
4 - 2
5 - 1
I'm sql retarded. Can someone give me a direction?
______________________________________________________________________
__
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf