I need a query that will count the occurance of each unique entry in a specified field. E.G. given the following record set:
field1 field2
--- 'x'
--- 'y'
--- 'x'
--- 'w'
the result should be similar to:
'x' = 2
'y' = 1
'w' = 1
A critical point (if possible) is the contents of field2 should not be defined before the query. Such that the query should not need to know which patterns might be in the field. It should only worry if there is a unique pattern discoverd, the number of times the pattern occurs in the record set should be counted.
.
field1 field2
--- 'x'
--- 'y'
--- 'x'
--- 'w'
the result should be similar to:
'x' = 2
'y' = 1
'w' = 1
A critical point (if possible) is the contents of field2 should not be defined before the query. Such that the query should not need to know which patterns might be in the field. It should only worry if there is a unique pattern discoverd, the number of times the pattern occurs in the record set should be counted.
.