Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to count records in a Select Statement
Message
De
09/11/1998 10:37:08
 
 
À
09/11/1998 10:30:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00155722
Message ID:
00155730
Vues:
20
>I am trying to count on these records for a certain criteria though. For ex: I have a table with 41,000 records that contains serial numbers for products, and need to know the top 10 selling products for that day?? I know that top 10 will give me the top 10 but without a count on that serial number. I need to get it to count on those distinct serial numbers. Maybe you can not do this with a select statement Can You??
>
>Darren

Probably, you ask something else. If you want to get 10 top counters then you should do following:
select top 10 count(*) as counter,* from mytable group by ser_number order by 1 desc
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform