>>Hi
>>I have a table with the following fields:
>>
Area c(30) Date d and Quantity N(10,2)
>>I have an sql statement that sums all quantities counts and groups by Area. I would like also, in the same sql statement, to have the Minimum and Maximum dates for every area. I don't know of any way of doing this, other than scan...endscan. Is this possible in a SQL Statement?
>>
>>Thx
>>Jaime
>
>select area, min(date) as MinDate, max(date) as MaxDate, ;
>sum(Quantity) as TotQ, cnt(*) as AreaCount ;
>from myTable ;
>group by area
>
>Cetin
Cetin
Didn't know i can use Min and Max with just one parameter, i'll give this a try!
Thx,
Jaime
Why do programs stop working correctly as soon as you leave the Fox?