Forked from ChiChou/Hacker_News_Ranking_Algorithm.sql
Created
April 30, 2014 05:32
-
-
Save BoZhuM/1a8f690af953a862f925 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- (p - 1) / (t + 2)^1.5 | |
CREATE FUNCTION SP_POINTS(P SMALLINT(5), CREATED TIMESTAMP) | |
RETURNS TINYINT(3) | |
RETURN (P - 1) / POW(TIMESTAMPDIFF(HOUR, CREATED, NOW()) + 2, 1.5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment