Does $\sum_{i=1}^n g(i) = \mathcal{O}(\sum_{i=1}^n (h(i)))$ imply that $g(n)= \mathcal{O}(h(n))$ when $g,h : \mathbb{N} \to \mathbb{R+}$?
I think this statement is wrong.
Is the following a valid counterexample ?
$g(n)=1 , \;\; h(n)=(\frac{1}{n})$
or this statment is actually true and i need to prove it ?
In your example, the summatory function of $g$ is $\sim n$ but the summatory function of $h$ is $\sim \log n$ so the assumption is not satisfied.