Try adding this after the WHERE line.
AND t.id = dvc.topic_id
I didn’t test it, but I think that’s your big problem (fixes the “same topic” problem)
Try adding this after the WHERE line.
AND t.id = dvc.topic_id
I didn’t test it, but I think that’s your big problem (fixes the “same topic” problem)