Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count sql statement
Message
De
03/09/2002 15:03:28
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00696342
Message ID:
00696345
Vues:
10
Try:
SELECT e_class, count(e_class) FROM cursor1 GROUP BY e_class
Alan

>I have a table that has following itemno and positions.
>
>
>Itemno    Position
>
>0110.01   CPO
>0543.01   ACPO
>0543.02   ACPO
>0840.01   AC
>0840.02   AC
>3125.01   SC
>3180.10   WPT
>
>
>I am trying to to count distinct positions as follows:
>
>CPO  1
>ACPO 2
>AC   2
>SC   1
>WPT  1
>
>
>when I run this sql statement:
>
>
>SELECT DISTINCT cursor1.e_class FROM cursor1
>
>it gives me distinct postions, but don't know how to get the count of the distinct postions. Does any know what I am doing wrong
>
>Thanks
>Nick Patel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform