Add midvals to colnames for stats query

Closes https://github.com/sot/kadi/issues/17.