Hallo,
ich habe folgendes Problem:
Ich habe 3 Tabellen, News, ForumBeitraege, ForumThreads
In ForumThreads sind nur news_id und ft_id.
In News ist eben news_id welche in ForumThreads der news_id entspricht!
In ForumBeiträge entspricht fb_ft_id der spalte news_is in ForumThreads.
Nun soll ich die 5 meistkommentierten News herausfiltern!
Nun komm ich nocht über
an die 5 häufigsten IDs, allerdings fällt mir nun kein weg ein, ein select zusammenzubasteln, wo ich auch noch an die entsprechende news komme!
Geht das überhaupt auf einmal, oder muss ich da 2 steps machen?
mfg
serial
ich habe folgendes Problem:
Ich habe 3 Tabellen, News, ForumBeitraege, ForumThreads
In ForumThreads sind nur news_id und ft_id.
In News ist eben news_id welche in ForumThreads der news_id entspricht!
In ForumBeiträge entspricht fb_ft_id der spalte news_is in ForumThreads.
Nun soll ich die 5 meistkommentierten News herausfiltern!
Nun komm ich nocht über
Code:
Select fb_ft_id, Count(fb_ft_id) AS Anzahl from ForumBeiträge Group By fb_ft_id Order By Count(fb_ft_id) Desc
Geht das überhaupt auf einmal, oder muss ich da 2 steps machen?
mfg
serial