That worked great, I never would have figured that out from the VFP online documentation. Thank You!
>Try
SELECT SalesmanID, SUM(Total) AS Sales, COUNT(*) AS Orders ;
> FROM mytable ;
> GROUP BY 1
>
>>This should be an easy SQL statement but I cannot figure out how to do it.
>>
>>I have a table with sales summary info to keep it simple
>>
>>
Inv_Date Date
>>Total N10.2
>>SalesmanID C5
>>
>>I want to create an sql statment that sums each salesman's sales and count's the number of orders to a cursor/table.
>>
>>So my resulting table would look like:
>>
>>
Salesman Sales Orders
>>MCMW 210,382 14
>>ALCS 155,417 12
>>PCKD 120,232 8
>>
>>I do some SQL but not none that generates summary info. Can I do this in SQL, or do I need to do it the old fashioned way?
>>