A comprehensive systematic study is made for the collective β and γ bands in even-even isotopes with neutron numbers N = 88 to 92 and proton numbers Z = 62 (Sm) to 70 (Yb). Data, including excitation energies, B(E 0) and B(E 2) values, and branching ratios from previously published experiments are collated with new data presented for the first time in this study. The experimental data are compared to calculations using a five-dimensional collective Hamiltonian (5DCH) based on the covariant density functional theory (CDFT). A realistic potential in the quadrupole shape parameters V (β, γ) is determined from potential energy surfaces (PES) calculated using the CDFT. The parameters of the 5DCH are fixed and contained within the CDFT. Overall, a satisfactory agreement is found between the data and the calculations. In line with the energy staggering S(I) of the levels in the 2 γ + bands, the potential energy surfaces of the CDFT calculations indicate γ-soft shapes in the N = 88 nuclides, which become γ rigid for N = 90 and N = 92. The nature of the 0 2 + bands changes with atomic number. In the isotopes of Sm to Dy, they can be understood as β vibrations, but in the Er and Yb isotopes the 0 2 + bands have wave functions with large components in a triaxial superdeformed minimum. In the vicinity of 152 Sm, the present calculations predict a soft potential in the β direction but do not find two coexisting minima. This is reminiscent of 152 Sm exhibiting an X (5) behavior. The model also predicts that the 0 3 + bands are of two-phonon nature, having an energy twice that of the 0 2 + band. This is in contradiction with the data and implies that other excitation modes must be invoked to explain their origin.