# mssql:test from [ { id = 1, x_int = 13, x_float = 13.0, k_int = 5, k_float = 5.0 }, { id = 2, x_int = -13, x_float = -13.0, k_int = 5, k_float = 5.0 }, { id = 3, x_int = 13, x_float = 13.0, k_int = -5, k_float = -5.0 }, { id = 4, x_int = -13, x_float = -13.0, k_int = -5, k_float = -5.0 }, ] select { id, x_int / k_int, x_int / k_float, x_float / k_int, x_float / k_float, q_ii = x_int // k_int, q_if = x_int // k_float, q_fi = x_float // k_int, q_ff = x_float // k_float, r_ii = x_int % k_int, r_if = x_int % k_float, r_fi = x_float % k_int, r_ff = x_float % k_float, (q_ii * k_int + r_ii | math.round 0), (q_if * k_float + r_if | math.round 0), (q_fi * k_int + r_fi | math.round 0), (q_ff * k_float + r_ff | math.round 0), } sort id