  We give q-analogues of the following congruences by Z.-W. Sun:
\sum_{k=1}^{p-1}\frac{D_k}{k} \equiv -\frac{2^{p-1}-1}{p} \pmod p,\\
\sum_{k=1}^{p-1}\frac{H_k}{k 2^k}\equiv 0 \pmod{p},\quad p\geqslant 5, where p
is a prime, D_n=\sum_{k=0}^{n}{n+k\choose 2k}{2k\choose k} are the Delannoy
numbers, and H_n=\sum_{k=1}^n\frac{1}{k} are the harmonic numbers. We also
prove that, for any positive integer m and prime p>m+1, \sum_{1\leqslant
k_1\leqslant \cdots \leqslant k_m\leqslant p-1}\frac{1}{k_1\cdots k_m 2^{k_m}}
\equiv\frac{1}{2}\sum_{k=1}^{p-1}\frac{(-1)^{k-1}}{k^m} \pmod p, which is a
multiple generalization of Kohnen's congruence. Furthermore, a q-analogue of
this congruence is established.
