*edit title: Member information Hi all, I currently have 2 tables with the following fields ARTICLE ArticleID ArticleTitle ArticleText MemberID Member MemberID Member info etc I am trying to Sort (ORDER BY) by the most active Members, that is, those who have written the most articles On the page I am trying to configure it to display Member 1 - articles written 1,2,3 etc Member 2 Member 3 etc. based on the number of article the member has written. In the above example, Member 1 may have written 5, Member 2 may have 2 articles and Member 3 might have 0 - so I am trying to count how many times MemberID appears in the ARTICLE table to get it to sort in this way, but having no such luck! Any assistance is much appreciated
I have the following code working but it only returns the ID NUMBER of the member, not their name (since that's stored in the Member table). Any ideas about how I can list the NAME instead of the ID number? Thanks again.
Try SELECT Member.Name, COUNT(Article.MemberID) AS total FROM Article, Member GROUP BY Member.Name ORDER BY Article.total DESC Code (markup):