Syntax
mysql> select topn_weighted(k5,k1,3) from baseall;
| topn_weighted(`k5`, `k1`, 3) |
+------------------------------+
+------------------------------+
1 row in set (0.02 sec)
mysql> select topn_weighted(k5,k1,3,100) from baseall;
| topn_weighted(`k5`, `k1`, 3, 100) |
+-----------------------------------+
| [0, 243.325, 100.001] |