This is more of a mySQL/SQL question. Hope it applies
here...
I have a semi-large table (2000-3000 records and growing) in
which I
have stored a decimal for each row. This number is an
*absolute* rating
score for the record. I'd like to derive from this a
*relative* rating
for each record from .5-10, in .5 increments.
So I need to calculate which PERCENTILE each record is in,
and assign
the relative score accordingly.
For instance, if a record has a score of 1234.5, and I find
that it's
in the 65th percentile (65% of records have absolute scores
<= 1234.5),
then I would assign it a relative score of 6.5.
My question is, how do I figure the percentile score for
each record?
I anticipate that this will be run as a batch process on a
nightly
basis, but I'm open to suggestions.
THANKS in advance!
- Ryan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "PHP & MySQL" group.
To post to this group, send email to phpmysql googlegroups.com
To unsubscribe from this group, send email to
phpmysql-unsubscribe googlegroups.com
For more options, visit this group at http://groups
.google.com/group/phpmysql
-~----------~----~----~----~------~----~------~--~---
|