PDA

View Full Version : Another new possible score....



Werinbert
11-03-2020, 02:32 AM
Since the conversation seems to be about odd MM scores...I am suggesting another new score.
A person gets a point for all trailing zeros at the end of their project credit scores. The scores would be truncated or floored to ignore any fractional-point score that may or may not exist.


So a person with 10,300 cr for project x, 230,000 for project y, and 34,974 for project z would get a score of 6 (2 + 4 + 0).

Bok
11-03-2020, 09:00 AM
Since the conversation seems to be about odd MM scores...I am suggesting another new score.
A person gets a point for all trailing zeros at the end of their project credit scores. The scores would be truncated or floored to ignore any fractional-point score that may or may not exist.


So a person with 10,300 cr for project x, 230,000 for project y, and 34,974 for project z would get a score of 6 (2 + 4 + 0).

An interesting concept. Unfortunately not easy at all to implement.

Because the numbers are stored as decimals 99% of them have decimals, so would have to round down.

Then convert to character string.

Then count the number of zeroes on the right hand side of the character string

Then sum these across all the projects for a user

Finally, do this across all users.

I can't figure out how to practically do the count of only zeroes on the right hand side with sql and not programmatically which would take too long

This is a count of ALL instances of the char 0 in the score column for me


MariaDB> select sum(LENGTH(convert(round(metric1,0),char)) - LENGTH(replace(convert(round(metric1,0),char),'0',''))) as zeroes from boinc_user where cpid = 'd4c59e612bf4dfec53b7e6206990b3f5';
+--------+
| zeroes |
+--------+
| 130 |
+--------+
1 row in set (0.001 sec)