This is an assignment I have to do for my Galois Theory course. I reproduce the version I wrote a couple of days ago in the hope it may help other people.
Let $G$ be a finite abelian group. Show that there exists a Galois extension $K/\mathbb{Q}$ with $Gal(K/\mathbb{Q}) \approx G$.
Let $G \approx \mathbb{Z}_{n_1} \times \ldots \times \mathbb{Z}_{n_k}$ be any abelian group. In this case, by Dirichlet's Theorem, there exist distinct primes $p_i$ such that $p_i \equiv 1 \mod(n_i)$. If $n = p_1 \ldots p_k$, the Chinese Remainder Theorem tells us that:
$$\mathbb{Z}_n \approx \mathbb{Z}_{p_1} \times \ldots \times \mathbb{Z}_{p_n}$$
Considering the restriction of the isomorphism from the Chinese Remainder Theorem to non-zero elements, we obtain that this ring isomorphism can be viewed as an isomorphism in the multiplicative group, i.e.:
$$(\mathbb{Z}_n)^* \approx (\mathbb{Z}_{p_1})^* \times \ldots \times (\mathbb{Z}_{p_n})^*$$
Every cyclic group is isomorphic to $\mathbb{Z}$ or $\mathbb{Z}_k$ for some $k$. $(\mathbb{Z}_p)^*$ corresponds to a cyclic group of order $p-1$, i.e., in additive notation, we have:
$$(\mathbb{Z}_n)^* \approx \mathbb{Z}_{p_1-1} \times \ldots \times \mathbb{Z}_{p_n-1} = \mathbb{Z}_{j_1n_1} \times \ldots \times \mathbb{Z}_{j_kn_k}$$
By Corollary 7.8 of Morandi's Galois Theory book, if $w$ is a primitive $n$-th root of unity, i.e., $w = e^{\frac{2\pi i}{n}}$, then $\mathbb{Q}(w) = \mathbb{Q}_w$ satisfies the following:
$$Gal(\mathbb{Q}_w/\mathbb{Q}) \approx (\mathbb{Z}_n)^* \approx \mathbb{Z}_{j_1n_1} \times \ldots \times \mathbb{Z}_{j_k n_k}$$
We will verify that: $\mathbb{Z}_{j_1} \times \ldots \times \mathbb{Z}_{j_k} \approx \hat{G} \triangleleft Gal(\mathbb{Q}_w/\mathbb{Q})$. For this, let's recall the following general result about groups: if $H \approx \mathbb{Z}_u$ is cyclic of order $u$, then there exists a subgroup for each divisor of $u$. Let $d$ be such a divisor, and let $L \approx \mathbb{Z}_d$ be the associated subgroup. There are $u/d$ cosets by Lagrange, so $|H/L| = u/d$. Clearly, $H/L$ is generated by $xL$, where $x$ generates $H$. Thus, $H/L$ is cyclic and isomorphic to $\mathbb{Z}_{u/d}$.
From what we discussed, since each $j_k | j_kn_k$, we need $\mathbb{Z}_{j_k} \approx {G}_k \triangleleft \mathbb{Z}_{j_kn_k}$.
Thus, we conclude that $\mathbb{Z}_{j_1} \times \ldots \times \mathbb{Z}_{j_k} \approx {G}_1 \times \ldots \times {G}_k \triangleleft \mathbb{Z}_{j_1n_1} \times \ldots \mathbb{Z}_{j_kn_k} \approx Gal(\mathbb{Q}_w/\mathbb{Q})$, and by normality, we use the Fundamental Theorem of Galois Theory to show that $K = \mathcal{F}(\hat{G})$ is Galois over $\mathbb{Q}$, and also:
$$Gal(K/\mathbb{Q}) \approx Gal(\mathbb{Q}_w/\mathbb{Q})/\hat{G} \approx \mathbb{Z}_{j_1n_1} \times \ldots \times \mathbb{Z}_{j_kn_k}/{G}_1 \times \ldots {G}_k $$
Because each $G_i$ is normal in $\mathbb{Z}_{j_in_i}$ we may simplify this further taking the quotient inside of the cross products!
$$Gal(K/\mathbb{Q})\approx\mathbb{Z}_{j_1n_1}/G_1 \times \ldots \times \mathbb{Z}_{j_kn_k}/G_k $$
Finally, because $\mathbb{Z}_{j_in_i}/G_i$ is cyclic and we know how many cosets there are by Lagrange ($j_i n_i/j_i$), we need:
$$Gal(K/\mathbb{Q})\approx\mathbb{Z}_{n_1} \times \ldots \times \mathbb{Z}_{n_k} \approx G$$