I have a table populated with user-submitted links which have been voted on by other users. The table has a column votes
as well as a column date
in the format 2013-05-12 11:52:55
. I now want to select the highest ranking links/rows by using the following formula: (taken from here)
(p - 1) / (t + 2)^1.5
p = votes (points) from users
t = time since submission in hours
Obviously selecting by votes alone would be easy (with select by votes desc
), but how do I implement the above formula in mysql?
TIA!