Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating the mode
Message
 
To
27/06/2001 23:38:07
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00524498
Message ID:
00527871
Views:
29
Gavin

Thanks for the tip - will try it out and see how it goes.

Cheers

Chris

>Hi Chris,
>
>How about:
>
>SELECT mynumber, COUNT(*) AS modecount ;
>    FROM mytable ;
>    GROUP BY 1 ;
>    ORDER BY 2 DESC ;
>    INTO CURSOR mycursor
>
>
>The first record in the cursor will contain the most common number.
>
>Hope this helps,
>Gavin...
>
>>Hi All
>>
>>We need to calculate the mode (most commonly occurring number) from a list of values - excel can do it with the MODE() function - does anyone know if VFP can do something similar?
>>
>>Cheers
>>
>>Chris Kable
Previous
Reply
Map
View

Click here to load this message in the networking platform