Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Question
Message
De
27/07/1998 15:34:11
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00121732
Message ID:
00121745
Vues:
17
>I've got a long program with a lot of scanning and counting to make a report. I'm wondering if it's possible to do the same thing in SQL.
>
>I have a table that includes two fields: Class and Zone. For each unique value of Zone, I want a count of how many of each type of class are in that zone.
>
>Say there's 3 zones: 1,2,3. Two classes: A,B.
>
>I want to know how many times for
>1,A
>1,B
>2,A
>etc.
>
>So I'll know Zone 1 had 6 of Class A.
>
>Can this be done in SQL?
>
>Thanks,
>
>-Michelle

Select Zone,Class,count(*) From Table1 Group by Zone,Class
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform