sql: allow by(x, a=x.sum())