BUG: Make user statistics postgresql-compatible