12. If three non-zero real numbers
$$
x(y-z) 、 y(z-x) 、 z(y-x)
$$

form a geometric sequence, then the common ratio $q=$ $\qquad$
12. $\frac{1 \pm \sqrt{5}}{2}$.

Notice that
$$
x(y-z)+y(z-x)=z(y-x) \text {. }
$$

Therefore, $1+q=q^{2}$.
Solving for $q$ gives $q=\frac{1 \pm \sqrt{5}}{2}$.