How do you calculate the wing moment coefficient knowing the moment at each spanwise station?
You can use the Lifting Line Theory to first calculate the downwash at each spanwise station, which are then converted to the induced AOA ($\alpha_i$).
The sectional moment coefficient and lift coefficient are:
$$c_m = c_{m_0}+c_{m_\alpha}(\alpha-\alpha_i)$$
$$c_l=c_{l_0}+a(\alpha-\alpha_i)$$
To get the total moment of a straight tapered wing (about the root chord leading edge for simplicity), it's a simple integration away, noting that the sectional moment is usually about the 1/4c of the local chord:
$$M_{LE} = q_\infty \int_{-b/2}^{b/2}{\left[ c(y)c_m(y)-\left(x_{LE}(y)+\frac{1}{4}c(y)\right)c_l(y) \right]c(y)dy}$$
where $c$ is the local chord length, $x_{LE}$ is the distance from the root LE to the local leading edge, and $q_\infty$ is the free-stream dynamic pressure. You'll have to normalize against a reference chord (e.g. MAC) to get the moment coefficient.
Finite large sweep wings have crossflow gradient that would render Lifting-Line Theory unreliable. You'd have to use a vortex surface method, such as Vortex Lattice, to derive accurate predictions.