How to adjust Derby SQL to yield only the top slugger with two-decimal rounding:
SELECT first, last, ROUND((h+2*d+3*t+4*r)/ab,2) slug FROM stats WHERE ab>=400 ORDER BY slug DESC LIMIT 1;
How to adjust Derby SQL to yield only the top slugger with two-decimal rounding:
SELECT first, last, ROUND((h+2*d+3*t+4*r)/ab,2) slug FROM stats WHERE ab>=400 ORDER BY slug DESC LIMIT 1;
hey, i love this approach! have u tried a sub query to directly pick the max before rounding? kinda curious how rounding might affect edge cases. what other methods have u experimented with?