Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this possible in an SQL Select Statement?
Message
De
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:
00675265
Vues:
9
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform