Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to count records in a Select Statement
Message
From
09/11/1998 10:37:08
 
 
To
09/11/1998 10:30:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00155722
Message ID:
00155730
Views:
19
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform