On the groups of rational points of three-dimensional groups