tg: ordering by id, group