Add missing group by
Only increment attempt count until they've gotten the perfect score
store 20-hour script in a static method rather than a static variable.

this protects it from being queried when other static variables are loaded (when the db may not yet exist)