Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this possible in an SQL Select Statement?
Message
 
À
04/07/2002 04:48:34
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00675261
Message ID:
00675273
Vues:
8
>>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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform