It is known that $$\sum_{p\leq x}\bigg(\frac{q}{p}\bigg)=o(\pi(x))$$for any $q$ which is not a square. Is there some references on such a character sum (summation over the moduli)?
Of course, by quadratic reciprocity law, it can be transformed to consider the following sum $$\sum_{p\leq x}\bigg(\frac{p}{q}\bigg).$$ By Perron's formula and some results of Dirichlet $L$-functions, we can of course obtain an upper bound. I want to know whether there is certain elementary proof.