This note contains a representation formula for positive solutions of linear degenerate second-order equations of the form $$ partial_t u (x,t) = sum_{j=1}^m X_j^2 u(x,t) + X_0 u(x,t) qquad (x,t) in mathbb{R}^N times, ]- infty ,T[,$$ proved by a functional analytic approach based on Choquet theory. As a consequence, we obtain Liouville-type theorems and uniqueness results for the positive Cauchy problem.