Let $G$ be a non-abelian group of order $pq^2$. Is it true that $G'\simeq \mathbb Z_q\times \mathbb Z_q$?
From a previous question, I learned that the only non-abelian group of order $pq^2$ is of the type $(\mathbb Z_q\times \mathbb Z_q)\rtimes \mathbb Z_p$ no matter which divisibility relation we use.
Thus $G/(\mathbb Z_q\times \mathbb Z_q)\simeq \mathbb Z_p$ and this implies that $ G' \subset \mathbb Z_q\times \mathbb Z_q$.