So, i'm building a members rewarding system for my forum and got stuck on this query for selecting "forum topic with most different participants".
I already have this query that counts how many posts (replies) each forum topic in last 24 hours has.
SELECT poster . * , count( odgovori.id_odgovor ) AS broj, members.username
FROM poster
INNER JOIN odgovori ON ( odgovori.na = poster.id_poster )
INNER JOIN members ON ( poster.od = members.id_member )
WHERE poster.datum = '01.06.09'
GROUP BY odgovori.na, odgovori.od
ORDER BY broj DESC
LIMIT 1
table poster - forum topics table table odgovori - replies table table members - members table, in this query only used to get topic author's username