If you want something more pre"cice....post the database....the table 
structure....and what you're after ;-)"

Ok here goes.

Assume this repeats a few dozen million times.

aTable
date, county, application, grower, field, crop
1/1/01, 1, 12, 2, 3, 6
1/1/02, 2, 2, 2, 4, 6
1/1/03, 2, 3, 2, 4, 6
1/1/05, 3, 2, 2, 4, 6
1/1/05, 3, 5, 3, 3, 7

Now I need to know the count of all records between a given date range, 
a sum of the application field and a count of the unique combinations of 
grower + field + crop.  So if I summarized the example I would get the 
following results

county, count(), sum(), unique
1          1          12       1
2          2           5        1
3          2           7        2

Dowe

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2927
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6

Reply via email to