Tienes dos opciones
INNER JOIN x
ON x.qid = y.qid OR (x.qid IS NULL AND y.qid IS NULL)
o más fácil
INNER JOIN x
ON x.qid IS NOT DISTINCT FROM y.qid
Tienes dos opciones
INNER JOIN x
ON x.qid = y.qid OR (x.qid IS NULL AND y.qid IS NULL)
o más fácil
INNER JOIN x
ON x.qid IS NOT DISTINCT FROM y.qid