Help with sql - autoclose/repeat results/week filter

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)