We show that the group of orientation-preserving affine transformations of the rational numbers is quasi-lattice ordered by its subsemigroup N⋊N×. The associated Toeplitz C∗-algebra T(N⋊N×) is universal for isometric representations which are covariant in the sense of Nica. We give a presentation of T(N⋊N×) in terms of generators and relations, and use this to show that the C∗-algebra QN recently introduced by Cuntz is the boundary quotient of in the sense of Crisp and Laca. The Toeplitz algebra T(N⋊N×) carries a natural dynamics σ, which induces the one considered by Cuntz on the quotient QN, and our main result is the computation of the KMSβ (equilibrium) states of the dynamical system (T(N⋊N×),R,σ) for all values of the inverse temperature β. For β∈[1,2] there is a unique KMSβ state, and the KMS1 state factors through the quotient map onto QN, giving the unique KMS state discovered by Cuntz. At β=2 there is a phase transition, and for β>2 the KMSβ states are indexed by probability measures on the circle. There is a further phase transition at β=∞, where the KMS∞ states are indexed by the probability measures on the circle, but the ground states are indexed by the states on the classical Toeplitz algebra T(N).