Home › Forums › kdb+ › Rounding in select statement › Re: Rounding in select statement
-
I would define
round:{(floor 0.5+y*i)%i:10 xexp x}
and then you can do
select time, sym, round[1]price from trade.
As a bonus, this works with negative numbers too, round[-3; 12345.678] is 12000.