Roland,

What Alan told you is the SQL answer. To do the equivalent in a Witango
Search Action:

1)  Change the "Select Type" on the "Select" tab from "Normal" to
"Summaries of Groups"

2)  Drag -- from the workspace "data sources" tab -- to the box labeled
"Select Columns" -- the database column that contains the values for
which you want to see the frequency distribution.

3) Drag the same column to the "Group By Columns" box.

4) Drag the table's primary key column from the data sources tab of the
workspace to the "Select Columns" box.

5) For the primary key item, click on the (default) MAX function, pull
down its list box, and choose "Count"

Make whatever changes you need to the "Order by" box, or the Criteria tab.

When you run the taf, you will get the same query that Alan and Robert
described. If you use a direct dbms, note that Robert has a comma that
you might need, depending on your data source vendor. Alan's syntax may
work for you but it may not because it's not standard SQL syntax.

Bill




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

Reply via email to