[sql]SELECT grps.groupid, grps.title, grps.create_date, grps.leaderid AS userid, grps_post.userid AS lastposter, grps_post.dateline AS lastpostdateline, COUNT( grps_post.userid ) AS replies
FROM grps
LEFT JOIN grps_pst ON ( grps_post.groupid = grps.groupid )
GROUP BY grps.groupid
ORDER BY grps_post.dateline DESC LIMIT 1[/sql]If i understand you correct, you could try this.
|